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.

Examples

Terminate a workflow execution

Request

curl -X 'DELETE' \
'https://<YOUR_CLUSTER>/api/workflow/77916c63-d3e7-11ef-87b1-b2b27c52ebde?reason=transaction%20cancelled&triggerFailureWorkflow=false' \
-H 'accept: */*' \
-H 'X-Authorization: <TOKEN>'

Response

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