Environment
A named place software runs, and the policy governing deploys to it.
Shape
- approval_enforcedbooleanWhether the platform enforces
protection.requires_approvalon deploys, so a client can tell a policy that is applied from one that is only recorded. - archivedbooleanWhether the environment is archived. An archived environment can no longer be deployed to but keeps its deployment history, and archiving can be undone. An environment with deployments cannot be deleted, only archived.
concurrencyConcurrencyPolicy
- The ConcurrencyPolicy schema
- exclusivebooleanoptionaldefault falseWhether deploys to this environment run one at a time. Off by default.
- max_lock_wait_secondsinteger · int32optional0–∞default 0How long a queued deploy waits for its turn before failing, in seconds: from 60 (shorter values are rounded up) to 21600.
0, the default, means it waits for as long as the pipeline's timeout allows. - modeConcurrencyModequeueskipcancel_previousoptionalWhat happens when a run wants to deploy while another run holds the lock:
queue(the default) waits its turn,skipskips the step, andcancel_previouscancels the other run.cancel_previousis available on environments only, not on a step's resource group.
- created_atstring
- environment_idEnvironmentId (string · uuid)
- owner_full_pathstringThe full path of the group or repository that owns the environment (e.g.
acme/platform), which shows when an environment in a repository's listing comes from a group above it. With the slug it forms the environment's OIDC claim,{owner_full_path}:{slug}. protectionEnvironmentProtection
- The EnvironmentProtection schema
- accept_fromAcceptFrompeople_signed_inpeoplepeople_and_service_accountspeople_and_agentsoptionalWhich kinds of approval count. A deployment approved by a bot is rarely what anyone meant, so the default is people, signed in.
- allowed_refsarray of stringoptionalGlobs the ref a run was started from must match for it to deploy here, in the same pattern language as branch rules. Empty allows any ref.
- allowed_scopesarray of ScopeRef or nulloptionalThe only groups and repositories allowed to deploy to this environment. Absent means the group or repository that owns it and everything beneath it.
- approversarray of ApproverRefoptionalWho may approve: people, teams, or a role at a group or repository. Authority to approve a deployment comes from being named here, never from a role alone.
- prevent_self_approvalbooleanoptionaldefault falseWhether the person who started the run is barred from approving its deployment. What counts is who started the run, not who wrote the commit: deploying somebody else's commit is still your deploy.
- requiredinteger · int32optional0–∞default 1Distinct approvals needed before the deployment starts, 1–10.
- requires_approvalbooleanoptionaldefault falseWhen set, a deployment to this environment waits for approval before it starts. Nothing runs and no credentials are issued while it waits.
- wait_timer_secondsinteger · int32optional0–∞default 0How long a deployment waits before it may start, in seconds, up to one hour.
0means no wait.
- scopeScopeRefThe group or repository that owns the environment. Groups and repositories beneath it can use it too.
- slugEnvironmentSlug (string)
- tierEnvironmentTierdevelopmenttestingstagingproductionWhat kind of environment this is, whatever it is called:
development,testing,stagingorproduction. Aproductionenvironment is protected by default. - updated_atstring
- variable_countinteger · int32How many variables the environment holds.
- versioninteger · int64Increases with every change. Send it with an update to have the update refused with
409if someone else changed the environment first. created_byActorSummary or nulloptional
- The ActorSummary schema
- emailstring
- idstring
- usernamestring
- avatar_urlstring or nulloptional
- display_namestring or nulloptional
- urlstring or nulloptional
Example
Synthesized example{
"approval_enforced": false,
"archived": false,
"concurrency": {
"exclusive": false,
"max_lock_wait_seconds": 0,
"mode": "queue"
},
"created_at": "2026-10-10T02:28:16Z",
"environment_id": "cd0f9443-67e1-4b1b-840b-60e07b525915",
"owner_full_path": "owner-full-path-27ae",
"protection": {
"accept_from": "people_signed_in",
"allowed_refs": [
"allowed-refs-00e6"
],
"allowed_scopes": [
{
"group": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69"
},
{
"group": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69"
}
],
"approvers": [
{
"anyone": {}
},
{
"anyone": {}
}
],
"prevent_self_approval": false,
"required": 1,
"requires_approval": false,
"wait_timer_seconds": 0
},
"scope": {
"group": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69"
},
"slug": "slug-dcc3",
"tier": "development",
"updated_at": "2026-10-10T11:41:29Z",
"variable_count": 0,
"version": 82,
"created_by": {
"email": "lin@acme.example",
"id": "id-a0c5",
"username": "mara",
"avatar_url": "https://gitmoap.example/acme/03a58b03"
},
"display_name": "Mara Okafor",
"url": "https://gitmoap.example/acme/9e341749"
}
Graph
Used inside
No schema contains this one.
Used by
Sent by 0 operations
No operation takes it as a request body.
Returned by 4 operations