Queries
Sorting and pagination
Every page has a deterministic order and a maximum of 100 records.
Use sort=field for ascending order or sort=-field for descending order. Trestle appends record ID as a stable tie-breaker. The default is ascending ID.
Opaque cursor
GET /api/v1/collections/issues/records?limit=25
→ {"items":[...],"nextCursor":"cmVjXy4uLg"}
GET /api/v1/collections/issues/records?limit=25&cursor=cmVjXy4uLgThe first cursor contract is intentionally restricted to ascending ID order. Invalid, stale or incompatible cursors fail explicitly rather than silently changing page semantics.
Provider storage
Sorting, cursor pagination and limit bounds are provider-neutral: opaque cursors encode the last ID, and page semantics are identical on SQLite and PostgreSQL. The cursor contract is deliberately restricted to ascending ID order.