Querying
Filtering, sorting, and paging list endpoints — and where the limits are.
Four query parameters. They are documented narrowly because the implementation is narrow, and a reference that promised more would be worse than one that promises little.
| Parameter | Format | Example |
|---|---|---|
filter | column:value | status:open |
sort | column [ASC|DESC] | created_at DESC |
limit | integer | 25 |
offset | integer | 50 |
curl "$AUTHORIC_URL/$APP_UID/autocrud/tickets?filter=status:open&sort=created_at%20DESC&limit=25" \
-H "Authorization: Bearer $TOKEN"The limits, stated plainly
filtermatches on equality only, on one column. There is noOR, no ranges, noLIKE, and no second condition.sorttakes one column. Direction defaults toASCif omitted or unrecognised.- Both are validated against the table's real columns. An unknown column is rejected rather than ignored.
- Rows and references are matched by uid.
filter=uid:<uid>finds one row, and a foreign key is filtered under its_uidname:filter=customer_uid:<uid>. Filtering onidor on the rawcustomer_idis refused with the name to use instead. sort=idmeans creation order. Theiditself is never returned. Auidcarries no order, so sorting by it is refused.
When you need more
Write a handler and expose it as a custom action. You get real SQL, on the server, behind a policy — which is a better answer than encoding a query language into a URL and hoping the escaping holds.
Paging
# First page
curl ".../autocrud/tickets?limit=25&offset=0&sort=id%20ASC"
# Next page
curl ".../autocrud/tickets?limit=25&offset=25&sort=id%20ASC"Always sort when paging. Without an explicit order, the database is free to return rows in any order and pages may overlap or skip.
Filtering is not authorization
filter narrows what you asked for. It does not decide what you are allowed to see — policy
does that, and it has already been applied before your filter runs. Removing a filter never
widens access.