curl --request POST \
--url https://api.example.com/api/task_runs/paginate \
--header 'Content-Type: application/json' \
--data '
{
"sort": "ID_DESC",
"page": 1,
"flows": {
"operator": "and_",
"id": {
"any_": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"deployment": {
"operator": "and_",
"is_null_": true
},
"name": {
"any_": [
"my-flow-1",
"my-flow-2"
],
"like_": "marvin"
},
"tags": {
"operator": "and_",
"all_": [
"tag-1",
"tag-2"
],
"is_null_": true
}
},
"flow_runs": {
"operator": "and_",
"id": {
"any_": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"not_any_": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"name": {
"any_": [
"my-flow-run-1",
"my-flow-run-2"
],
"like_": "marvin"
},
"tags": {
"operator": "and_",
"all_": [
"tag-1",
"tag-2"
],
"any_": [
"tag-1",
"tag-2"
],
"is_null_": true
},
"deployment_id": {
"operator": "and_",
"any_": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"is_null_": true
},
"work_queue_name": {
"operator": "and_",
"any_": [
"work_queue_1",
"work_queue_2"
],
"is_null_": true
},
"state": {
"operator": "and_",
"type": {
"any_": [
"SCHEDULED"
],
"not_any_": [
"SCHEDULED"
]
},
"name": {
"any_": [
"<string>"
],
"not_any_": [
"<string>"
]
}
},
"flow_version": {
"any_": [
"<string>"
]
},
"start_time": {
"before_": "2023-11-07T05:31:56Z",
"after_": "2023-11-07T05:31:56Z",
"is_null_": true
},
"end_time": {
"before_": "2023-11-07T05:31:56Z",
"after_": "2023-11-07T05:31:56Z",
"is_null_": true
},
"expected_start_time": {
"before_": "2023-11-07T05:31:56Z",
"after_": "2023-11-07T05:31:56Z"
},
"next_scheduled_start_time": {
"before_": "2023-11-07T05:31:56Z",
"after_": "2023-11-07T05:31:56Z"
},
"parent_flow_run_id": {
"operator": "and_",
"any_": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"parent_task_run_id": {
"operator": "and_",
"any_": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"is_null_": true
},
"idempotency_key": {
"any_": [
"<string>"
],
"not_any_": [
"<string>"
]
}
},
"task_runs": {
"operator": "and_",
"id": {
"any_": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"name": {
"any_": [
"my-task-run-1",
"my-task-run-2"
],
"like_": "marvin"
},
"tags": {
"operator": "and_",
"all_": [
"tag-1",
"tag-2"
],
"is_null_": true
},
"state": {
"operator": "and_",
"type": {
"any_": [
"SCHEDULED"
]
},
"name": {
"any_": [
"<string>"
]
}
},
"start_time": {
"before_": "2023-11-07T05:31:56Z",
"after_": "2023-11-07T05:31:56Z",
"is_null_": true
},
"expected_start_time": {
"before_": "2023-11-07T05:31:56Z",
"after_": "2023-11-07T05:31:56Z"
},
"subflow_runs": {
"exists_": true
},
"flow_run_id": {
"operator": "and_",
"any_": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"is_null_": false
}
},
"deployments": {
"operator": "and_",
"id": {
"any_": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"not_any_": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"name": {
"any_": [
"my-deployment-1",
"my-deployment-2"
],
"like_": "marvin"
},
"flow_or_deployment_name": {
"like_": "<string>"
},
"paused": {
"eq_": true
},
"tags": {
"operator": "and_",
"all_": [
"tag-1",
"tag-2"
],
"any_": [
"tag-1",
"tag-2"
],
"is_null_": true
},
"work_queue_name": {
"any_": [
"work_queue_1",
"work_queue_2"
]
},
"concurrency_limit": {
"ge_": 123,
"le_": 123,
"is_null_": true
}
},
"limit": 123
}
'{
"results": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"task_key": "<string>",
"name": "<string>",
"flow_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"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"
}
},
"task_version": "1.0",
"parameters": {},
"task_inputs": {},
"context": {},
"empirical_policy": {
"max_retries": 0,
"retry_delay_seconds": 0,
"retries": 123,
"retry_delay": 123,
"retry_jitter_factor": 123
},
"tags": [
"<string>"
]
}
],
"count": 123,
"limit": 123,
"pages": 123,
"page": 123
}Pagination query for task runs.
curl --request POST \
--url https://api.example.com/api/task_runs/paginate \
--header 'Content-Type: application/json' \
--data '
{
"sort": "ID_DESC",
"page": 1,
"flows": {
"operator": "and_",
"id": {
"any_": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"deployment": {
"operator": "and_",
"is_null_": true
},
"name": {
"any_": [
"my-flow-1",
"my-flow-2"
],
"like_": "marvin"
},
"tags": {
"operator": "and_",
"all_": [
"tag-1",
"tag-2"
],
"is_null_": true
}
},
"flow_runs": {
"operator": "and_",
"id": {
"any_": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"not_any_": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"name": {
"any_": [
"my-flow-run-1",
"my-flow-run-2"
],
"like_": "marvin"
},
"tags": {
"operator": "and_",
"all_": [
"tag-1",
"tag-2"
],
"any_": [
"tag-1",
"tag-2"
],
"is_null_": true
},
"deployment_id": {
"operator": "and_",
"any_": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"is_null_": true
},
"work_queue_name": {
"operator": "and_",
"any_": [
"work_queue_1",
"work_queue_2"
],
"is_null_": true
},
"state": {
"operator": "and_",
"type": {
"any_": [
"SCHEDULED"
],
"not_any_": [
"SCHEDULED"
]
},
"name": {
"any_": [
"<string>"
],
"not_any_": [
"<string>"
]
}
},
"flow_version": {
"any_": [
"<string>"
]
},
"start_time": {
"before_": "2023-11-07T05:31:56Z",
"after_": "2023-11-07T05:31:56Z",
"is_null_": true
},
"end_time": {
"before_": "2023-11-07T05:31:56Z",
"after_": "2023-11-07T05:31:56Z",
"is_null_": true
},
"expected_start_time": {
"before_": "2023-11-07T05:31:56Z",
"after_": "2023-11-07T05:31:56Z"
},
"next_scheduled_start_time": {
"before_": "2023-11-07T05:31:56Z",
"after_": "2023-11-07T05:31:56Z"
},
"parent_flow_run_id": {
"operator": "and_",
"any_": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"parent_task_run_id": {
"operator": "and_",
"any_": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"is_null_": true
},
"idempotency_key": {
"any_": [
"<string>"
],
"not_any_": [
"<string>"
]
}
},
"task_runs": {
"operator": "and_",
"id": {
"any_": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"name": {
"any_": [
"my-task-run-1",
"my-task-run-2"
],
"like_": "marvin"
},
"tags": {
"operator": "and_",
"all_": [
"tag-1",
"tag-2"
],
"is_null_": true
},
"state": {
"operator": "and_",
"type": {
"any_": [
"SCHEDULED"
]
},
"name": {
"any_": [
"<string>"
]
}
},
"start_time": {
"before_": "2023-11-07T05:31:56Z",
"after_": "2023-11-07T05:31:56Z",
"is_null_": true
},
"expected_start_time": {
"before_": "2023-11-07T05:31:56Z",
"after_": "2023-11-07T05:31:56Z"
},
"subflow_runs": {
"exists_": true
},
"flow_run_id": {
"operator": "and_",
"any_": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"is_null_": false
}
},
"deployments": {
"operator": "and_",
"id": {
"any_": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"not_any_": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"name": {
"any_": [
"my-deployment-1",
"my-deployment-2"
],
"like_": "marvin"
},
"flow_or_deployment_name": {
"like_": "<string>"
},
"paused": {
"eq_": true
},
"tags": {
"operator": "and_",
"all_": [
"tag-1",
"tag-2"
],
"any_": [
"tag-1",
"tag-2"
],
"is_null_": true
},
"work_queue_name": {
"any_": [
"work_queue_1",
"work_queue_2"
]
},
"concurrency_limit": {
"ge_": 123,
"le_": 123,
"is_null_": true
}
},
"limit": 123
}
'{
"results": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"task_key": "<string>",
"name": "<string>",
"flow_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"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"
}
},
"task_version": "1.0",
"parameters": {},
"task_inputs": {},
"context": {},
"empirical_policy": {
"max_retries": 0,
"retry_delay_seconds": 0,
"retries": 123,
"retry_delay": 123,
"retry_jitter_factor": 123
},
"tags": [
"<string>"
]
}
],
"count": 123,
"limit": 123,
"pages": 123,
"page": 123
}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 >= 1Filter for flows. Only flows matching all criteria will be returned.
Show child attributes
Filter flow runs. Only flow runs matching all criteria will be returned
Show child attributes
Filter task runs. Only task runs matching all criteria will be returned
Show child attributes
Filter for deployments. Only deployments matching all criteria will be returned.
Show child attributes
Defaults to PREFECT_API_DEFAULT_LIMIT if not provided.
Was this page helpful?