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
Parameter | Description | Type | Required/ Optional |
---|---|---|---|
workflowId | The execution ID of the workflow to be rerun. | string | Required. |
Request body
Format the request as an object containing the following parameters.
Parameter | Description | Type | Required/ Optional |
---|---|---|---|
reRunFromTaskId | The unique identifier of the task to rerun the workflow from. | string | Optional. |
reRunFromWorkflowId | The unique identifier of the workflow to be rerun. | string | Optional. |
correlationId | The 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. | string | Optional. |
taskInput | The updated task inputs for the task identified in reRunFromTaskId. If unspecified, the same inputs from the previous run will be used. | object | Optional. |
workflowInput | The updated workflow inputs. If unspecified, the same inputs from the previous run will be used. | object | Optional. |
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.