Promote to an environment
API reference · Generated from the API definition
POST/v1/ws/{ws}/envs/{env}/promote
Deploys what runs in another environment (usually stage) here, without rebuilding. Waits for the commit’s checks.
Parameters
| ws* | string, path | The workspace's address. |
| env* | string, path | Where to promote to, such as prod. |
| from* | string, body | Where to promote from, such as stage. |
| apps | string[], body | The apps to promote. All of them if left out. |
Request
{ "from": "stage", "apps": ["billing-api"] }Response · 202
{
"deploys": [
{ "app": "billing-api", "commit": "e293d89", "status": "deploying" }
]
}Errors
| 403 | role_missing | Promoting to an environment marked production needs Deploy to production. |
| 409 | checks_pending | The commit's checks haven't passed yet. |