Skip to Content
SeyloDocs
API referenceDeployments

Roll back to a deployment

POST
/api/v1/deployments.rollback

Deploys the image of an earlier successful deployment again, by digest, without building. Settings and environment are the current ones. Fails when the image is no longer kept.

Needs services.deploy on the service (a grant on its project covers it). Available to MCP clients and the assistant.

Authorization

cookieseylo_session<token>

Request Body

application/json
  1. body
serviceId*string

Panel-issued id.

Match^[a-z0-9]{16}$
deploymentId*string

Panel-issued id.

Match^[a-z0-9]{16}$

Response Body

Success.

application/json
  1. response
id*string

Panel-issued id.

Match^[a-z0-9]{16}$
serviceId*string

Panel-issued id.

Match^[a-z0-9]{16}$
generation*integer
Range1 <= value
status*string|string|string|string|string|string|string
live*boolean
trigger*string|string|string|string|string|string|string|string
actor*string|null
commit*|null
builder*string|string|string|null
builtOn*|null
shippedTo*array<>
image*|null
steps*array<>
durationMs*|null
canRollback*boolean
rollbackOf*|null
error*string|null
createdAt*string
Formatdate-time
startedAt*|null
finishedAt*|null
Example Request
curl -X POST 'https://example.com/api/v1/deployments.rollback' \  -H 'Content-Type: application/json' \  -d '{  "serviceId": "string",  "deploymentId": "string"}'
Example Response
{  "id": "string",  "serviceId": "string",  "generation": 1,  "status": "queued",  "live": true,  "trigger": "manual",  "actor": "string",  "commit": {    "sha": "string",    "message": "string",    "branch": "string",    "author": "string"  },  "builder": "railpack",  "builtOn": {    "id": "string",    "name": "string"  },  "shippedTo": [    {      "id": "string",      "name": "string"    }  ],  "image": {    "reference": "string",    "digest": "string",    "sizeBytes": 0,    "shippedBytes": 0  },  "steps": [    {      "key": "clone",      "status": "pending",      "node": {        "id": "string",        "name": "string"      },      "detail": "string",      "durationMs": 0    }  ],  "durationMs": 0,  "canRollback": true,  "rollbackOf": "string",  "error": "string",  "createdAt": "2019-08-24T14:15:22Z",  "startedAt": "2019-08-24T14:15:22Z",  "finishedAt": "2019-08-24T14:15:22Z"}