Rollback deployment
Changed onRoll live traffic back to a previous deployment. deploymentId is the deployment to roll back TO; the app's current deployment is used as the rollback source automatically.
The target deployment must be ready, not already shutting down, belong to the production environment, and must not itself be the current deployment.
After a rollback the app is marked as rolled back, which prevents new deployments from automatically taking over live traffic. Promote the rolled-back deployment (or a newer one) to clear this state.
Rollback runs as a durable workflow: this endpoint returns once the rollback is accepted. Poll getDeployment or listDeployments to observe the result.
Required Permissions
Your root key must have write permission on the environment:
- unkey:v1:<workspace_id>:projects/<project_id>/apps/<app_id>/environments/<environment_id>#write
Request
- Base URLhttps://api.unkey.com
- URLhttps://api.unkey.com/v2/deployments.rollbackDeployment
- AuthHTTP bearer
Request body
Example request
{
"deploymentId": "proj_1234abcd"
}Response
Rollback accepted. Poll getDeployment to observe the result.
Example response
{
"meta": {
"requestId": "req_123"
}
}Changes
- info
added the non-success response with the status
- info
- info
the endpoint scheme security
bearerwas added to the API - info
the endpoint scheme security
rootKeywas removed from the API
- info