Skip to main content

Update Task Status in Workflow

Endpoint: POST /tasks/{workflowId}/{taskRefName}/{status}

Updates the status of a running task in a workflow execution.

Path parameters

ParameterDescriptionTypeRequired/ Optional
workflowIdThe execution ID of the workflow containing the task.stringRequired.
taskRefNameThe reference name of the task whose status is to be updated.stringRequired.
statusThe status to which the task is to be updated. Supported values:
  • IN_PROGRESS
  • FAILED
  • FAILED_WITH_TERMINAL_ERROR
  • COMPLETED
stringRequired.

Query parameters

ParameterDescriptionTypeRequired/ Optional
workerIdThe worker name from which the task is being polled, which is the hostname of the pod where the worker is runningstringOptional.

Request body

Format the request to include any additional parameters, such as task output parameters.

Example

{
"taskOutput": "Add this as task output"
}

Response

Returns the task execution ID of the updated task.

Examples

Update task status in a workflow

Request

curl -X 'POST' \
'https://<YOUR_CLUSTER>/api/tasks/3e1baeeb-bdfa-11ef-88e4-ce0afa758ea1/wait_ref/FAILED' \
-H 'accept: text/plain' \
-H 'X-Authorization: <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"taskOutput": "Add this as task output"
}'

Response

3e1c723c-bdfa-11ef-88e4-ce0afa758ea1