8000 docs: clarify django style filters · mattholy/server-client-python@8410b67 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8410b67

Browse files
committed
docs: clarify django style filters
Add notes about supported endpoints and being able to use multiple filters at a time.
1 parent b6cde48 commit 8410b67

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/filter-sort.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,21 @@ Sort can take multiple args, with desc direction added as a (-) prefix
138138
workbooks = workbooks.order_by("project_name", "-created_at")
139139
```
140140

141+
### Supported endpoints
142+
143+
The following endpoints support the Django style filters and sorts:
144+
145+
* Datasources
146+
* Flow Runs
147+
* Flows
148+
* Groups
149+
* Groupsets
150+
* Jobs
151+
* Projects
152+
* Users
153+
* Views
154+
* Workbooks
155+
141156
### More detailed examples
142157

143158
```py
@@ -147,6 +162,12 @@ workbooks = server.workbooks.all()
147162
# filters can be appended in new lines
148163
workbooks = workbooks.filter(project_name=project_name)
149164

165+
# multiple filters can be added in a single line
166+
workbooks = workbooks.filter(project_name=project_name, owner_name=owner_name, size__gte=1000)
167+
168+
# Find all views in a project, with a specific tag
169+
views = server.views.filter(project_name=project_name, tags="stale")
170+
150171
# sort can take multiple args, with desc direction added as a (-) prefix
151172
workbooks = workbooks.order_by("project_name", "-created_at")
152173

0 commit comments

Comments
 (0)
0