Skip to main content
POST
/
workflows
/
tasks
/
{taskId}
/
update
Python SDK
res = client.workflows.tasks.update("000560bc-9080-4286-b242-a27bb4819253", "completed")

res = client.workflows.tasks.update("000560bc-9080-4286-b242-a27bb4819253", "failed", output={"a": 1, "b": 2})

res = client.workflows.executions.run("my workflow", "1")
res = client.workflows.executions.retrieve_detailed(res.id)
res = client.workflows.tasks.update(res.tasks[1].id, "completed")
{
  "id": "<string>",
  "externalId": "<string>",
  "status": "IN_PROGRESS",
  "taskType": "function",
  "input": {
    "function": {
      "externalId": "my.known.id",
      "data": {
        "key1": "value1",
        "key2": "value2"
      }
    },
    "isAsyncComplete": false
  },
  "output": {
    "callId": 123,
    "functionId": 123,
    "response": {}
  },
  "parentTaskExternalId": "<string>",
  "startTime": 1730204346000,
  "endTime": 1730204346000,
  "reasonForIncompletion": "<string>"
}

Authorizations

Authorization
string
header
required

Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.

Path Parameters

taskId
string
required

UUIDv4 identifier for the execution of a workflow task.

Required string length: 36

Body

application/json
status
enum<string>
required
Available options:
COMPLETED,
FAILED,
FAILED_WITH_TERMINAL_ERROR
output
object

Custom output data of the task, which will be merged with the original output of the task. The output data should be in JSON format, and is limited to 100KB in size.

Example:
{ "key1": "value1", "key2": "value2" }

Response

200 - application/json

Updated task

id
string
required

UUIDv4 identifier for the execution of a workflow task.

Required string length: 36
externalId
string
required

Identifier for the task. Must be unique within the version. No trailing or leading whitespace and no null characters allowed. Task external IDs cannot be exactly 'workflow' or start with '__' (double underscore) as these are reserved.

Maximum string length: 255
status
enum<string>
required
Available options:
IN_PROGRESS,
CANCELED,
FAILED,
FAILED_WITH_TERMINAL_ERROR,
COMPLETED,
COMPLETED_WITH_ERRORS,
SCHEDULED,
TIMED_OUT,
SKIPPED
taskType
enum<string>
required
Available options:
function,
transformation,
cdf,
dynamic,
subworkflow,
simulation
input
Function Task Parameters · object
required

The input to the task with the references present in the definition resolved.

output
Function Task Output · object
required
parentTaskExternalId
string | null

The external ID of the parent task when this task is part of a dynamic task or subworkflow.

Maximum string length: 255
startTime
integer<int64>

The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

Required range: x >= 0
Example:

1730204346000

endTime
integer<int64>

The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

Required range: x >= 0
Example:

1730204346000

reasonForIncompletion
string

Human-readable reason for terminal failure of a workflow task.

Last modified on April 23, 2026