Skip to content

Commit 4468c68

Browse files
jorwoodsclaude
andcommitted
docs: add flows.filter to api-ref.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 16914c2 commit 4468c68

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
@@ -1828,6 +1828,40 @@ flow = server.flows.get_by_id('1a2a3b4b-5c6c-7d8d-9e0e-1f2f3a4a5b6b')
18281828
result = server.flows.schedule_flow_run('schedule-id-here', flow)
18291829
```
18301830

1831+
<br>
1832+
<br>
1833+
1834+
#### flows.filter
1835+
1836+
```py
1837+
flows.filter(**kwargs)
1838+
```
1839+
1840+
Returns a list of flows that match the specified filters. Fields and operators are passed as keyword arguments in the form `field_name=value` or `field_name__operator=value`.
1841+
1842+
**Supported fields and operators**
1843+
1844+
Field | Operators
1845+
:--- | :---
1846+
`created_at` | `eq`, `gt`, `gte`, `lt`, `lte`
1847+
`name` | `eq`, `in`
1848+
`owner_name` | `eq`
1849+
`project_id` | `eq`
1850+
`project_name` | `eq`, `in`
1851+
`updated` | `eq`, `gt`, `gte`, `lt`, `lte`
1852+
1853+
**Returns**
1854+
1855+
Returns a `QuerySet` of `FlowItem` objects.
1856+
1857+
**Example**
1858+
1859+
```py
1860+
matching_flows = server.flows.filter(project_name='My Project')
1861+
for flow in matching_flows:
1862+
print(flow.name)
1863+
```
1864+
18311865
<br>
18321866

18331867
---

0 commit comments

Comments
 (0)