Skip to content
Skip to Content

Roll back to a deployment

POST
/deployments/{deploymentId}/rollback

Deploys that deployment's image again, with the service's settings of today. It replaces what runs now.

This loses data or replaces what runs; MCP asks for confirmation first.

Authorization

bearer
headerAuthorizationBearer <token>

An API key (opk_…) or a CLI token (opc_…).

Path parameters

deploymentId*string

The deployment's id.

Header parameters

Idempotency-Key?string

Any unique string up to 255 characters. Sending the same request again with it returns the first answer instead of creating twice.

Lengthlength <= 255

Response body

Roll back to a deployment

application/json
  1. response
id*string
Formatuuid
serviceId*string
Formatuuid
projectId*string
Formatuuid
status*string
Value in"queued""building""deploying""running""failed""superseded""cancelled"
commit*string|null
image*string|null
config*

The service's settings when this deployment was made, and where each replica runs.

rollbackOf*|null
error*string|null
createdBy*string|null
createdAt*string
Formatdate-time
finishedAt*|null
Example request
curl -X POST "https://openpanel.sh/api/v1/deployments/$DEPLOYMENT_ID/rollback" \  -H "Authorization: Bearer $OPENPANEL_TOKEN"
Example response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "serviceId": "8f8bb40f-b96b-40fe-9064-5031fbe483f9",  "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",  "status": "queued",  "commit": "string",  "image": "string",  "config": {    "property1": null,    "property2": null  },  "rollbackOf": "65f4f6e9-31b7-43b4-9674-5c6963c953c2",  "error": "string",  "createdBy": "string",  "createdAt": "2019-08-24T14:15:22Z",  "finishedAt": "2019-08-24T14:15:22Z"}