REST API
Querying Data (Filtering & Sorting)
Pagination parameters, sorting directives, field equality filters, and batch ID retrieval.
Query Parameters Reference
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | Integer | 20 | Number of entries to return. Maximum value is 100. |
offset | Integer | 0 | Number of entries to skip for pagination. |
order_by | String | created_at | Sort field: created_at, updated_at, or any custom schema field key. |
order | String | DESC | Sort direction: ASC (ascending) or DESC (descending). |
filter[key] | String | — | Equality filter on any schema field (e.g. filter[status]=active). The long form filter[status][value]=active is equivalent. Unknown field keys are ignored. |
where[key] | String | — | Alias for filter[key]. |
format | String | — | standard returns the uniform response envelope. See API Overview. |
ids | String | — | Comma-separated list of entry IDs to fetch directly (e.g. ?ids=1,2,5). |
expand | String | — | Relation field key. The related entry is inlined one level deep; deeper relations are not followed. |
Filtering Examples
Multiple filters combine automatically with boolean AND. A bare field query such as ?status=active also works as a filter, as long as the name is not a reserved parameter (limit, offset, order_by, order, expand, ids, filter, where, format):
cURL Query Example
# Filter active projects, sorted by updated date, page 2:
curl -H "Authorization: Bearer pk_live_..." \
"https://example.com/wp-json/pottr/v1/collections/project?filter\[status\]=active&filter\[category\]=design&order_by=updated_at&order=DESC&limit=10&offset=10"Batch ID Lookups
To fetch specific entries without manual iterative loops, pass ?ids=101,102,105. Batch queries maintain full row-level security for user-owned collections.