Environments API
List and manage workspace environments used as promote and deploy targets.
Environments (typically dev, staging, prod) are created with a workspace and used by promotion and deploy flows.
See also: Environment Promotion · Workspaces
List / create (workspace)
| Method | Path | Permission | Notes |
|---|---|---|---|
GET | /v1/workspaces/{workspace_id}/environments | read | |
POST | same | write | Body: { "name": "qa" } |
PATCH | …/environments/{environment_id} | write | name?, status? (active|suspended) |
DELETE | …/environments/{environment_id} | delete |
Get by id
GET /v1/environments/{environment_id}Permission: read on the environment
Promote channels
Promotion is not a single environments endpoint — use the resource APIs:
| Channel | Compare / promote |
|---|---|
| Secrets | /v1/workspaces/{id}/secrets/compare|promote |
| Flags | Flags API |
| Apps | Apps API |
| Coderunners | Coderunners API |
Related
- ReBAC model — environment
deployerrelation - Workspaces API