Skip to main content
When querying collections, the default sort order will typically be by id in descending order. However, you can choose a different sort order by specifying the sort query parameter with one of the field names listed in the endpoint description. You may specify a secondary sort order by specifying the sort value as a comma-separated list of the field names to use for sorting. Field names prefixed with - will be sorted in descending order by the given field, otherwise the result will be sorted in ascending order by the given field. Example: To sort first by priority in descending order and then by name in ascending order:
Request Query
The primary key is always applied as an implicit final tiebreaker, so rows with equal sort values have a stable, deterministic order across requests and pages.
Sorted results are fully pageable. When a collection is sorted by anything other than id, the paging cursors returned in the next and previous properties (and in meta) are opaque tokens bound to the requested sort — follow them as-is and keep the same sort value for every page of a walk. Reusing a cursor with a different sort returns a 400 error. A plain record id is also accepted as a cursor for sorted collections and resumes from that record’s position in the sort order.
Request Query
See paging parameters for more details on paging sorted results.

Paging

See paging parameters for more information on paging large result sets.