Pagination and search
Pagination
Section titled “Pagination”List endpoints (GET /<resource>) accept:
| Param | Default | Meaning |
|---|---|---|
limit | 10 | Items per page. Use -1 to return all items. |
page | 1 | 1-indexed page number. |
orderBy | resource default | Field to sort by. |
order | asc | asc or desc. |
Responses include:
X-Total-Countheader with the unfiltered total.Linkheader withprev,next,lastrelations (RFC 5988).
Search
Section titled “Search”POST-based search lives at /<resource>/search. It accepts the same
fields as the resource model, plus a filters object for structured
matches. Use search when:
- You need substring or partial matches.
- You need to filter on nested fields.
- The list endpoint’s query params aren’t expressive enough.
Search responses follow the same pagination contract as list endpoints.