Stop a run
Stops a run. The caller needs the stop right on the run's environments and may then stop any run there, not only their own; a run that has already finished (COMPLETED, FAILED, CANCELLED or REJECTED) is refused with 409, naming nothing beyond that it has already finished.
Stops a run. The caller needs the stop right on the run's environments and may then stop any run there, not only their own; a run that has already finished (COMPLETED, FAILED, CANCELLED or REJECTED) is refused with 409, naming nothing beyond that it has already finished.
POST /api/v1/executions/{executionId}/cancel
Authorization
Requires a signed-in person with this scope: runs:cancel.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
X-Workspace-Id | header | yes | string (uuid) | The workspace the call acts in. Take it from the workspace list. |
executionId | path | yes | string (uuid) | The run's id. |
Responses
200
The run, stopped (or already finished).
| Field | Type | Required | Description |
|---|---|---|---|
executionId | string (uuid) | yes | |
pipelineId | string (uuid) | yes | |
pipelineName | string | yes | |
status | one of PENDING, PREPARING, READY, EXECUTING, EXTRACTING, TRANSFERRING, LOADING, COMPLETING, HELD, COMPLETED, FAILED, CANCELLED, REJECTED | yes | |
startedAt | string (date-time) | no | |
completedAt | string (date-time) | no | |
initiatedBy | string | no | |
recordsProcessed | integer | yes | |
bytesTransferred | integer | yes | |
errorMessage | string | no | |
heldReason | string | no | |
heldAt | string (date-time) | no | |
createdAt | string (date-time) | no | |
updatedAt | string (date-time) | no | |
progress | integer | yes | |
currentStage | string | yes | |
actions | list of object | yes | |
actions[].actionId | string (uuid) | no | |
actions[].actionType | string | no | |
actions[].status | string | no | |
actions[].completedBlocks | integer | no | |
actions[].totalBlocks | integer | no | |
actions[].errorMessage | string | no | |
actions[].stages | list of object | no | |
actions[].stages[].sequence | integer | yes | |
actions[].stages[].title | string | yes | |
actions[].stages[].status | one of NOT_RUN, PREPARING, DISPATCHED, COMPLETED, FAILED, HELD | yes | |
actions[].stages[].recordsProcessed | integer | no | |
actions[].stages[].unitsCompleted | integer | no | |
actions[].stages[].unitsTotal | integer | no | |
actions[].stages[].errorMessage | string | no | |
actions[].stages[].mergeOutcome | object | no | What a stage's merges did to the target; absent when the stage performed or reported no merge, which is not the same as three zeros. |
actions[].stages[].mergeOutcome.inserted | integer | yes | |
actions[].stages[].mergeOutcome.updated | integer | yes | |
actions[].stages[].mergeOutcome.unchanged | integer | yes | |
actions[].parameters | object | no | |
actions[].exportArtefact | object | no | Where an export put the data; absent when the export reported no artefact (a database-target export, or an agent too old to report one). |
actions[].exportArtefact.name | string | yes | |
actions[].exportArtefact.path | string | yes | |
actions[].exportArtefact.sizeBytes | integer | no | |
actions[].exportArtefact.remotePath | string | no | |
actions[].outputRef | string | no | |
actions[].outputEnvironmentId | string (uuid) | no |
400
A path id is not even syntactically a valid id (not a well-formed UUID) — distinct from 404, which means a well-formed id that simply does not exist.
| Field | Type | Required | Description |
|---|---|---|---|
message | string | yes | |
status | integer | yes | |
errorCode | string | yes | |
timestamp | string (date-time) | no | |
path | string | no | |
details | object | no |
403
The caller lacks the stop right on this run's environments.
| Field | Type | Required | Description |
|---|---|---|---|
message | string | yes | |
status | integer | yes | |
errorCode | string | yes | |
timestamp | string (date-time) | no | |
path | string | no | |
details | object | no |
404
There is no such run.
| Field | Type | Required | Description |
|---|---|---|---|
message | string | yes | |
status | integer | yes | |
errorCode | string | yes | |
timestamp | string (date-time) | no | |
path | string | no | |
details | object | no |
409
The run cannot be stopped from its current state.
| Field | Type | Required | Description |
|---|---|---|---|
errorCode | one of INVALID_STATE_TRANSITION | yes | |
message | string | yes |