Environments
Preview

Replace an environment's settings

The deploy window is the default for the environment's pipeline stages; a stage may narrow it, never widen it. Notification targets are stored as configuration and nothing is delivered to them yet. The settings of an archived environment cannot be changed.

PUT
/environments/{environmentId}/settings
cookiebetter-auth.session_token<token>

Better Auth session cookie. Production uses the __Secure- prefixed name.

environmentId*string
Formatuuid
Idempotency-Key?string

Makes retries safe. A repeated key with the same request returns the first result and sets Idempotent-Replayed: true. The same key with a different request answers 409 idempotency.key_reused, and while the first request is still running 409 idempotency.in_progress. Results are kept for 24 hours. Server errors and refusals for lack of sign-in or permission are not kept, so a retry runs again.

Match^[A-Za-z0-9_.:-]+$
Length1 <= length <= 255
application/json
  1. body
deployWindow*|null
notificationTargets*array<>
Itemsitems <= 20
terminalAccess?TerminalAccess

Who may open a terminal in the pods of the environment's deployments. deployers is everyone who may manage the deployment; named is only people who were given the pod:exec duty by name. Leaving it out of a change keeps the current choice.

Value in"deployers""named"
terminalNotifyOwner?boolean

Leaving it out keeps the current choice.

Response Body

The updated settings.

application/json
  1. response
deployWindow*|

Null while deployments may start at any time.

notificationTargets*array<>
terminalAccess*TerminalAccess

Who may open a terminal in the pods of the environment's deployments. deployers is everyone who may manage the deployment; named is only people who were given the pod:exec duty by name. Leaving it out of a change keeps the current choice.

Value in"deployers""named"
terminalNotifyOwner*boolean

Whether the team that owns a deployment is told when someone opens a terminal in its pods. On until turned off.

updatedAt*|

Null while the environment has the defaults.

Formatdate-time
Example Request
curl -X PUT 'https://wardn.example.com/api/v1/environments/497f6eca-6276-4993-bfeb-53cbbbba6f08/settings' \  -H 'Content-Type: application/json' \  -d '{  "deployWindow": {    "days": [      "mon"    ],    "start": "09:00",    "end": "17:00",    "timeZone": "Europe/Berlin"  },  "notificationTargets": [    {      "kind": "slack",      "target": "string"    }  ]}'
Example Response
{  "deployWindow": {    "days": [      "mon"    ],    "start": "09:00",    "end": "17:00",    "timeZone": "Europe/Berlin"  },  "notificationTargets": [    {      "kind": "slack",      "target": "string",      "what": "changes",      "enabled": true    }  ],  "terminalAccess": "deployers",  "terminalNotifyOwner": true,  "updatedAt": "2019-08-24T14:15:22Z"}