Task Runs
Set Task Run State
APIs & SDK
- Overview
- Python SDK Overview
- REST API
- REST API overview
- Cloud API
- Server API
- Server API Overview
- Root
- Flows
- Flow Runs
- Task Runs
- Flow Run States
- Task Run States
- Flow Run Notification Policies
- Deployments
- SavedSearches
- Logs
- Concurrency Limits
- Concurrency Limits V2
- Block types
- Block documents
- Work Pools
- Task Workers
- Work Queues
- Artifacts
- Block schemas
- Block capabilities
- Collections
- Variables
- GETCreate Csrf Token
- Events
- Automations
- UI
- Admin
- CLI Reference
Task Runs
Set Task Run State
Set a task run state, invoking any orchestration rules.
POST
/
api
/
task_runs
/
{id}
/
set_state
{
"state": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "SCHEDULED",
"name": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"message": "Run started",
"data": "<any>",
"state_details": {
"flow_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"child_flow_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scheduled_time": "2023-11-07T05:31:56Z",
"cache_key": "<string>",
"cache_expiration": "2023-11-07T05:31:56Z",
"deferred": true,
"untrackable_result": false,
"pause_timeout": "2023-11-07T05:31:56Z",
"pause_reschedule": false,
"pause_key": "<string>",
"run_input_keyset": {},
"refresh_cache": true,
"retriable": true,
"transition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_parameters_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"traceparent": "<string>"
}
},
"status": "ACCEPT",
"details": {
"type": "accept_details"
}
}
Headers
Path Parameters
The task run id
Body
application/json
The intended state.
The type of the state to create
Available options:
SCHEDULED
, PENDING
, RUNNING
, COMPLETED
, FAILED
, CANCELLED
, CRASHED
, PAUSED
, CANCELLING
The name of the state to create
The message of the state to create
The data of the state to create
The details of the state to create
If false, orchestration rules will be applied that may alter or prevent the state transition. If True, orchestration rules are not applied.
Response
200
application/json
Successful Response
A container for the output of state orchestration.
Represents the state of a run.
Enumeration of state types.
Available options:
SCHEDULED
, PENDING
, RUNNING
, COMPLETED
, FAILED
, CANCELLED
, CRASHED
, PAUSED
, CANCELLING
Data associated with the state, e.g. a result. Content must be storable as JSON.
Enumerates return statuses for setting run states.
Available options:
ACCEPT
, REJECT
, ABORT
, WAIT
Was this page helpful?
{
"state": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "SCHEDULED",
"name": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"message": "Run started",
"data": "<any>",
"state_details": {
"flow_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"child_flow_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scheduled_time": "2023-11-07T05:31:56Z",
"cache_key": "<string>",
"cache_expiration": "2023-11-07T05:31:56Z",
"deferred": true,
"untrackable_result": false,
"pause_timeout": "2023-11-07T05:31:56Z",
"pause_reschedule": false,
"pause_key": "<string>",
"run_input_keyset": {},
"refresh_cache": true,
"retriable": true,
"transition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_parameters_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"traceparent": "<string>"
}
},
"status": "ACCEPT",
"details": {
"type": "accept_details"
}
}