Skip to main content

Terminate Workflow

Endpoint: DELETE /api/workflow/{workflowId}

Terminates a running workflow, with the option to provide a reason for termination and/or trigger a failure workflow.

Path parameters

ParameterDescriptionTypeRequired/ Optional
workflowIdThe execution ID of the workflow to be terminated.stringRequired.

Query parameters

ParameterDescriptionTypeRequired/ Optional
reasonThe reason for termination.stringOptional.
triggerFailureWorkflowIf set to true, the associated compensation flow (if any) will be triggered. Default is false.

Learn more about compensation flows in Handling Failures.
booleanOptional.

Response

Returns 200 OK, indicating that the workflow execution has been terminated successfully.

Examples

Terminate a workflow execution

Request

curl -X 'DELETE' \
'https://<YOUR-PORTAL>/api/workflow/fd7s07f3b619-6edb-11f0-b0d8-2aadd5744325?reason=Terminated%20via%20API&triggerFailureWorkflow=false' \
-H 'accept: */*' \
-H 'X-Authorization: <TOKEN>'

Response

Returns 200 OK, indicating that the workflow execution has been terminated successfully. You can view the termination reason in the Conductor UI.

Screenshot of Conductor UI showing terminated workflow with the termination reason.

Terminate a workflow execution triggering a failure workflow

Request

curl -X 'DELETE' \
'https://<YOUR-PORTAL>/api/workflow/fd7s07f3b619-6edb-11f0-b0d8-2aadd5744325?reason=Terminated%20via%20API&triggerFailureWorkflow=true' \
-H 'accept: */*' \
-H 'X-Authorization: <TOKEN>'

Response

Returns 200 OK, indicating that the workflow execution has been terminated successfully, triggering the failure workflow.

Screenshot of Conductor UI showing terminated workflow that triggered a compensation workflow.