Skip to content

Commit a61a5d2

Browse files
jorwoodsclaude
andcommitted
docs: add flow_runs.filter to api-ref.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e6dcc9a commit a61a5d2

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

docs/api-ref.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,6 +1415,40 @@ print("Flow run completed with status: {}".format(flow_run.status))
14151415
<br>
14161416
<br>
14171417

1418+
#### flow_runs.filter
1419+
1420+
```py
1421+
flow_runs.filter(**kwargs)
1422+
```
1423+
1424+
Returns a list of flow runs that match the specified filters. Fields and operators are passed as keyword arguments in the form `field_name=value` or `field_name__operator=value`.
1425+
1426+
**Supported fields and operators**
1427+
1428+
Field | Operators
1429+
:--- | :---
1430+
`complete_at` | `eq`, `gt`, `gte`, `lt`, `lte`
1431+
`flow_id` | `eq`, `in`
1432+
`progress` | `eq`, `gt`, `gte`, `lt`, `lte`
1433+
`started_at` | `eq`, `gt`, `gte`, `lt`, `lte`
1434+
`user_id` | `eq`, `in`
1435+
1436+
**Returns**
1437+
1438+
Returns a `QuerySet` of `FlowRunItem` objects.
1439+
1440+
**Example**
1441+
1442+
```py
1443+
flow = server.flows.get_by_id('1a2a3b4b-5c6c-7d8d-9e0e-1f2f3a4a5b6b')
1444+
recent_runs = server.flow_runs.filter(flow_id=flow.id)
1445+
for run in recent_runs:
1446+
print(run.id, run.status)
1447+
```
1448+
1449+
<br>
1450+
<br>
1451+
14181452
---
14191453

14201454
## Groups

0 commit comments

Comments
 (0)