[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"task_key": "<string>",
"dynamic_key": "<string>",
"name": "<string>",
"flow_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cache_key": "<string>",
"cache_expiration": "2023-11-07T05:31:56Z",
"task_version": "<string>",
"empirical_policy": {
"max_retries": 0,
"retry_delay_seconds": 0,
"retries": 123,
"retry_delay": 123,
"retry_jitter_factor": 123
},
"tags": [
"<string>"
],
"labels": {
"key": "value1",
"key2": 42
},
"state_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_inputs": {},
"state_type": "SCHEDULED",
"state_name": "<string>",
"run_count": 0,
"flow_run_run_count": 0,
"expected_start_time": "2023-11-07T05:31:56Z",
"next_scheduled_start_time": "2023-11-07T05:31:56Z",
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z",
"total_run_time": 0,
"estimated_run_time": 0,
"estimated_start_time_delta": 0,
"state": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "SCHEDULED",
"name": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"message": "Run started",
"data": "<unknown>",
"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": false,
"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>",
"deployment_concurrency_lease_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
]Query for task runs.
[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"task_key": "<string>",
"dynamic_key": "<string>",
"name": "<string>",
"flow_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cache_key": "<string>",
"cache_expiration": "2023-11-07T05:31:56Z",
"task_version": "<string>",
"empirical_policy": {
"max_retries": 0,
"retry_delay_seconds": 0,
"retries": 123,
"retry_delay": 123,
"retry_jitter_factor": 123
},
"tags": [
"<string>"
],
"labels": {
"key": "value1",
"key2": 42
},
"state_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_inputs": {},
"state_type": "SCHEDULED",
"state_name": "<string>",
"run_count": 0,
"flow_run_run_count": 0,
"expected_start_time": "2023-11-07T05:31:56Z",
"next_scheduled_start_time": "2023-11-07T05:31:56Z",
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z",
"total_run_time": 0,
"estimated_run_time": 0,
"estimated_start_time_delta": 0,
"state": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "SCHEDULED",
"name": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"message": "Run started",
"data": "<unknown>",
"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": false,
"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>",
"deployment_concurrency_lease_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
]Defines task run sorting options.
ID_DESC, EXPECTED_START_TIME_ASC, EXPECTED_START_TIME_DESC, NAME_ASC, NAME_DESC, NEXT_SCHEDULED_START_TIME_ASC, END_TIME_DESC x >= 0Filter for flows. Only flows matching all criteria will be returned.
Show child attributes
Operator for combining filter criteria. Defaults to 'and_'.
and_, or_ Filter criteria for Flow.name
Filter criteria for Flow.tags
Show child attributes
Operator for combining filter criteria. Defaults to 'and_'.
and_, or_ A list of tags. Flows will be returned only if their tags are a superset of the list
["tag-1", "tag-2"]If true, only include flows without tags
Filter flow runs. Only flow runs matching all criteria will be returned
Show child attributes
Operator for combining filter criteria. Defaults to 'and_'.
and_, or_ Filter criteria for FlowRun.name
Show child attributes
Filter criteria for FlowRun.tags
Show child attributes
Operator for combining filter criteria. Defaults to 'and_'.
and_, or_ A list of tags. Flow runs will be returned only if their tags are a superset of the list
["tag-1", "tag-2"]A list of tags to include
["tag-1", "tag-2"]If true, only include flow runs without tags
Filter criteria for FlowRun.deployment_id
Show child attributes
Operator for combining filter criteria. Defaults to 'and_'.
and_, or_ A list of flow run deployment ids to include
If true, only include flow runs without deployment ids
Filter criteria for `FlowRun.work_queue_name
Show child attributes
Operator for combining filter criteria. Defaults to 'and_'.
and_, or_ A list of work queue names to include
["work_queue_1", "work_queue_2"]If true, only include flow runs without work queue names
Filter criteria for FlowRun.state
Show child attributes
Operator for combining filter criteria. Defaults to 'and_'.
and_, or_ Filter criteria for FlowRun.state_type
Show child attributes
A list of flow run state types to include
Enumeration of state types.
SCHEDULED, PENDING, RUNNING, COMPLETED, FAILED, CANCELLED, CRASHED, PAUSED, CANCELLING A list of flow run state types to exclude
Enumeration of state types.
SCHEDULED, PENDING, RUNNING, COMPLETED, FAILED, CANCELLED, CRASHED, PAUSED, CANCELLING Filter criteria for FlowRun.start_time
Show child attributes
Only include flow runs starting at or before this time
Only include flow runs starting at or after this time
If true, only return flow runs without a start time
Filter criteria for FlowRun.end_time
Show child attributes
Filter criteria for FlowRun.expected_start_time
Filter criteria for FlowRun.next_scheduled_start_time
Show child attributes
Filter criteria for subflows of the given flow runs
Filter criteria for FlowRun.parent_task_run_id
Show child attributes
Operator for combining filter criteria. Defaults to 'and_'.
and_, or_ A list of flow run parent_task_run_ids to include
If true, only include flow runs without parent_task_run_id
Filter task runs. Only task runs matching all criteria will be returned
Show child attributes
Operator for combining filter criteria. Defaults to 'and_'.
and_, or_ Filter criteria for TaskRun.name
Show child attributes
Filter criteria for TaskRun.tags
Show child attributes
Operator for combining filter criteria. Defaults to 'and_'.
and_, or_ A list of tags. Task runs will be returned only if their tags are a superset of the list
["tag-1", "tag-2"]If true, only include task runs without tags
Filter criteria for TaskRun.state
Show child attributes
Operator for combining filter criteria. Defaults to 'and_'.
and_, or_ Filter criteria for TaskRun.state_type
Show child attributes
A list of task run state types to include
Enumeration of state types.
SCHEDULED, PENDING, RUNNING, COMPLETED, FAILED, CANCELLED, CRASHED, PAUSED, CANCELLING Filter criteria for TaskRun.start_time
Show child attributes
Only include task runs starting at or before this time
Only include task runs starting at or after this time
If true, only return task runs without a start time
Filter criteria for TaskRun.expected_start_time
Filter criteria for TaskRun.flow_run_id
Show child attributes
Operator for combining filter criteria. Defaults to 'and_'.
and_, or_ A list of task run flow run ids to include
Filter for task runs with None as their flow run id
Filter for deployments. Only deployments matching all criteria will be returned.
Show child attributes
Operator for combining filter criteria. Defaults to 'and_'.
and_, or_ Filter criteria for Deployment.name
Show child attributes
Filter criteria for Deployment.name or Flow.name
Show child attributes
A case-insensitive partial match on deployment or flow names. For example, passing 'example' might match deployments or flows with 'example' in their names.
Filter criteria for Deployment.tags
Show child attributes
Operator for combining filter criteria. Defaults to 'and_'.
and_, or_ A list of tags. Deployments will be returned only if their tags are a superset of the list
["tag-1", "tag-2"]A list of tags to include
["tag-1", "tag-2"]If true, only include deployments without tags
DEPRECATED: Prefer Deployment.concurrency_limit_id over Deployment.concurrency_limit. If provided, will be ignored for backwards-compatibility. Will be removed after December 2024.
Show child attributes
Only include deployments with a concurrency limit greater than or equal to this value
Only include deployments with a concurrency limit less than or equal to this value
If true, only include deployments without a concurrency limit
Defaults to PREFECT_API_DEFAULT_LIMIT if not provided.
Successful Response
A unique identifier for the task being run.
A dynamic key used to differentiate between multiple runs of the same task within the same flow run.
The flow run id of the task run.
An optional cache key. If a COMPLETED state associated with this cache key is found, the cached COMPLETED state will be used instead of executing the task run.
Specifies when the cached state should expire.
The version of the task being run.
Defines of how a task run should retry.
Show child attributes
The maximum number of retries. Field is not used. Please use retries instead.
The delay between retries. Field is not used. Please use retry_delay instead.
The number of retries.
A delay time or list of delay times between retries, in seconds.
Determines the amount a retry should jitter
A list of tags for the task run.
The id of the current task run state.
Tracks the source of inputs to a task run. Used for internal bookkeeping.
Show child attributes
The type of the current task run state.
SCHEDULED, PENDING, RUNNING, COMPLETED, FAILED, CANCELLED, CRASHED, PAUSED, CANCELLING The name of the current task run state.
The number of times the task run has been executed.
If the parent flow has retried, this indicates the flow retry this run is associated with.
The task run's expected start time.
The next time the task run is scheduled to start.
The actual start time.
The actual end time.
Total run time. If the task run was executed multiple times, the time of each run will be summed.
A real-time estimate of total run time.
The difference between actual and expected start time.
The current task run state.
Show child attributes
Enumeration of state types.
SCHEDULED, PENDING, RUNNING, COMPLETED, FAILED, CANCELLED, CRASHED, PAUSED, CANCELLING "Run started"
Data associated with the state, e.g. a result. Content must be storable as JSON.
Show child attributes
Was this page helpful?