Skip to content

Cancel an operation

POST
/api/v1/operations/{id}/cancel
curl --request POST \
--url https://api.deploybase.eu/api/v1/api/v1/operations/example/cancel \
--header 'Authorization: <Authorization>'

Cancels a working operation: a build still queued or building is cancelled, and the operation ends cancelled with reason cancelled_by_user. A deployment that already published stays published. Cancelling a finished operation returns it unchanged. A ship whose deployment is already production answers 409 OPERATION_ALREADY_LIVE with a rollback next action; if the build cannot be cancelled the call fails and the operation keeps working.

id
required
string

Operation ID (UUID)

OK

Media type application/json
object
data
meta
object
request_id
string
timestamp
string
trace_id
string
data
object
actor
object
client_name
string
kind
string
Allowed values: user agent api_key push system
completed_at
string
created_at
string
deployment_id
string
docs_url
string
id
string
kind
string
Allowed values: ship
message
string
next_actions
Array<object>
object
action
string
cli
string
description
string
http
string
tool
string
poll_after_ms

PollAfterMs is how long a client that does not long-poll should wait before reading again; absent once the operation is terminal.

integer
project_id
string
reason
string
Allowed values: build_failed upload_incomplete quota_exceeded promotion_conflict verify_failed ssr_start_failed cancelled_by_user internal invalid_request
result
object
deployment_id
string
url
string
verify
object
checked_at
string
components
Array<object>
object
cold_ms
integer
component

Component is “static”, “ssr” or “function:”.

string
error

Error says why the component is not ok, when a status code alone does not.

string
ok
boolean
protected

Protected: the site is private and verify could not get past its access gate (DEP-967).

boolean
served_deployment_id
string
status_code
integer
ttfb_ms
integer
url
string
verdict
string
status
string
Allowed values: working input_required completed failed cancelled
step
string
Allowed values: upload build publish promote verify
updated_at
string
who_acts
string
Allowed values: agent human platform

Example

{
"data": {
"actor": {
"kind": "user"
},
"kind": "ship",
"reason": "build_failed",
"status": "working",
"step": "upload",
"who_acts": "agent"
}
}

INSUFFICIENT_SCOPE when an agent connected with read or preview access cancels a production ship, with a WWW-Authenticate insufficient_scope challenge

Media type application/json
object
code
string
details
docs_url
string
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
next_actions
Array<object>
object
action
string
cli
string
description
string
http
string
tool
string
reason

The structured outcome (ADR-030, DEP-965). Optional and additive: only the operations endpoints fill them so far, and a client that does not know them reads the rest as before.

string
who_acts
string

Example generated

{
"code": "example",
"details": "example",
"docs_url": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
},
"next_actions": [
{
"action": "example",
"cli": "example",
"description": "example",
"http": "example",
"tool": "example"
}
],
"reason": "example",
"who_acts": "example"
}

Operation not found, or OPERATIONS_API_DISABLED

Media type application/json
object
code
string
details
docs_url
string
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
next_actions
Array<object>
object
action
string
cli
string
description
string
http
string
tool
string
reason

The structured outcome (ADR-030, DEP-965). Optional and additive: only the operations endpoints fill them so far, and a client that does not know them reads the rest as before.

string
who_acts
string

Example generated

{
"code": "example",
"details": "example",
"docs_url": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
},
"next_actions": [
{
"action": "example",
"cli": "example",
"description": "example",
"http": "example",
"tool": "example"
}
],
"reason": "example",
"who_acts": "example"
}

OPERATION_ALREADY_LIVE

Media type application/json
object
code
string
details
docs_url
string
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
next_actions
Array<object>
object
action
string
cli
string
description
string
http
string
tool
string
reason

The structured outcome (ADR-030, DEP-965). Optional and additive: only the operations endpoints fill them so far, and a client that does not know them reads the rest as before.

string
who_acts
string

Example generated

{
"code": "example",
"details": "example",
"docs_url": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
},
"next_actions": [
{
"action": "example",
"cli": "example",
"description": "example",
"http": "example",
"tool": "example"
}
],
"reason": "example",
"who_acts": "example"
}

Live 39b0b6ad built