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
Parameter | Description | Type | Required/ Optional |
---|---|---|---|
workflowId | The execution ID of the workflow to be terminated. | string | Required. |
Query parameters
Parameter | Description | Type | Required/ Optional |
---|---|---|---|
reason | The reason for termination. | string | Optional. |
triggerFailureWorkflow | If set to true, the associated compensation flow (if any) will be triggered. Default is false. Learn more about compensation flows in Handling Failures. | boolean | Optional. |
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.
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.