Skip to content

Rollback Deployment

POST
/api/deployments/{deployment_id}/rollback
curl --request POST \
--url 'https://example.com/api/deployments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/rollback?organization_id=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \
--header 'Authorization: Bearer <token>'

Rollback a deployment.

Allowed only when the current status is INSTALLING, INSTALLED, or FAILED. Inserts a ‘force_cancel’ control_map_actions row so the next agent poll receives a cancel directive, updates firmware_deployments.status = ROLLED_BACK, and sets rolled_back_at = now(UTC).

Idempotent: if the deployment is already ROLLED_BACK the operation is a no-op and 204 is still returned.

Returns: 204 No Content on success or idempotent no-op.

Raises: HTTPException 404 if the deployment is not found or not owned by org. HTTPException 422 if the deployment is not in an allowed status.

deployment_id
required
Deployment Id
string format: uuid
organization_id
required
Organization Id
string format: uuid

Successful Response

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}