Skip to main content

Rerun Workflow

Endpoint: POST /api/workflow/{workflowId}/rerun

Reruns an ongoing or terminal workflow from a specific reRunFromTaskId task, or reruns a terminal workflow execution from the start, with the option to supply updated inputs.

Path parameters

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

Request body

Format the request as an object containing the following parameters.

ParameterDescriptionTypeRequired/ Optional
reRunFromTaskIdThe unique identifier of the task to rerun the workflow from.stringOptional.
reRunFromWorkflowIdThe unique identifier of the workflow to be rerun.stringOptional.
correlationIdThe unique identifier used to correlate the current workflow execution with other executions of the same workflow.

If unspecified, the same correlation ID from the previous run will be used.
stringOptional.
taskInputThe updated task inputs for the task identified in reRunFromTaskId.

If unspecified, the same inputs from the previous run will be used.
objectOptional.
workflowInputThe updated workflow inputs.

If unspecified, the same inputs from the previous run will be used.
objectOptional.

Example

{
"correlationId": "string",
"reRunFromTaskId": "string",
"reRunFromWorkflowId": "string",
"taskInput": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"workflowInput": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
}
}

Response

Returns the supplied workflowId.

Examples

Rerun workflow from the start

Request

curl -X 'POST' \
'https://<YOUR-CLUSTER>/api/workflow/3163f2e3-d4a9-11ef-a114-0af1b159704e/rerun' \
-H 'accept: text/plain' \
-H 'X-Authorization: <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"reRunFromWorkflowId": "3163f2e3-d4a9-11ef-a114-0af1b159704e"
}'

Response

3163f2e3-d4a9-11ef-a114-0af1b159704e
Rerun workflow from a task

Request

curl -X 'POST' \
'https://<YOUR_CLUSTER>/api/workflow/3163f2e3-d4a9-11ef-a114-0af1b159704e/rerun' \
-H 'accept: text/plain' \
-H 'X-Authorization: <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"reRunFromTaskId": "87799dc8-d4b8-11ef-a114-0af1b159704e"
}'

Response

3163f2e3-d4a9-11ef-a114-0af1b159704e
Rerun workflow from a task with updated task inputs

Request

curl -X 'POST' \
'https://<YOUR-CLUSTER>/api/workflow/d069c77c-5895-11f0-881b-7e8a6dcd068a/rerun' \
-H 'accept: text/plain' \
-H 'X-Authorization: <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"reRunFromTaskId": "d06afffd-5895-11f0-881b-7e8a6dcd068a",
"taskInput": {
"name": "user2"
}
}'

Response

d069c77c-5895-11f0-881b-7e8a6dcd068a

In the Conductor UI, the workflow execution will rerun from the specified task with the updated input.

Conductor UI showing workflow in RUNNING state with the updated task input user2.