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.

Last updated:

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

NameInRequiredTypeDescription
X-Workspace-Idheaderyesstring (uuid)The workspace the call acts in. Take it from the workspace list.
executionIdpathyesstring (uuid)The run's id.

Responses

200

The run, stopped (or already finished).

FieldTypeRequiredDescription
executionIdstring (uuid)yes
pipelineIdstring (uuid)yes
pipelineNamestringyes
statusone of PENDING, PREPARING, READY, EXECUTING, EXTRACTING, TRANSFERRING, LOADING, COMPLETING, HELD, COMPLETED, FAILED, CANCELLED, REJECTEDyes
startedAtstring (date-time)no
completedAtstring (date-time)no
initiatedBystringno
recordsProcessedintegeryes
bytesTransferredintegeryes
errorMessagestringno
heldReasonstringno
heldAtstring (date-time)no
createdAtstring (date-time)no
updatedAtstring (date-time)no
progressintegeryes
currentStagestringyes
actionslist of objectyes
actions[].actionIdstring (uuid)no
actions[].actionTypestringno
actions[].statusstringno
actions[].completedBlocksintegerno
actions[].totalBlocksintegerno
actions[].errorMessagestringno
actions[].stageslist of objectno
actions[].stages[].sequenceintegeryes
actions[].stages[].titlestringyes
actions[].stages[].statusone of NOT_RUN, PREPARING, DISPATCHED, COMPLETED, FAILED, HELDyes
actions[].stages[].recordsProcessedintegerno
actions[].stages[].unitsCompletedintegerno
actions[].stages[].unitsTotalintegerno
actions[].stages[].errorMessagestringno
actions[].stages[].mergeOutcomeobjectnoWhat 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.insertedintegeryes
actions[].stages[].mergeOutcome.updatedintegeryes
actions[].stages[].mergeOutcome.unchangedintegeryes
actions[].parametersobjectno
actions[].exportArtefactobjectnoWhere 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.namestringyes
actions[].exportArtefact.pathstringyes
actions[].exportArtefact.sizeBytesintegerno
actions[].exportArtefact.remotePathstringno
actions[].outputRefstringno
actions[].outputEnvironmentIdstring (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.

FieldTypeRequiredDescription
messagestringyes
statusintegeryes
errorCodestringyes
timestampstring (date-time)no
pathstringno
detailsobjectno

403

The caller lacks the stop right on this run's environments.

FieldTypeRequiredDescription
messagestringyes
statusintegeryes
errorCodestringyes
timestampstring (date-time)no
pathstringno
detailsobjectno

404

There is no such run.

FieldTypeRequiredDescription
messagestringyes
statusintegeryes
errorCodestringyes
timestampstring (date-time)no
pathstringno
detailsobjectno

409

The run cannot be stopped from its current state.

FieldTypeRequiredDescription
errorCodeone of INVALID_STATE_TRANSITIONyes
messagestringyes