get_task_runs
Retrieve task runs with optional filters by state, name, or other criteria. Use to monitor workflow execution, find failed tasks, or search for tasks by name pattern.
Instructions
Get task runs with optional filters.
Returns a list of task runs and their details matching the filters. Note that 'task_inputs' contains dependency tracking information (upstream task relationships), not the actual parameter values passed to the task.
Filter operators:
any_: Match any value in list
like_: SQL LIKE pattern matching
not_any_: Exclude values
is_null_: Check for null/not null
Examples: - List recent tasks: get_task_runs() - Get specific task: get_task_runs(filter={"id": {"any_": [""]}}) - Failed tasks: get_task_runs(filter={"state": {"type": {"any_": ["FAILED"]}}}) - Tasks by pattern: get_task_runs(filter={"name": {"like_": "%process%"}})
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of task runs to return | |
| filter | No | JSON filter object for advanced querying. Supports all Prefect TaskRunFilter fields. | |
| workspace_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | ||
| error | Yes | ||
| success | Yes | ||
| task_runs | Yes |