Skip to main content

Pagination

Canary returns opaque cursors that belong to one endpoint and one set of filters. Send the cursor back unchanged and keep every other query parameter stable throughout a traversal.

Choose the endpoint variant

Custom-field definition lists return a complete array and have no pagination parameters.

ID cursor

Canary-native resources use the last resource ID as the continuation point. Their response carries pagination under meta.pagination:
Continue while has_more is true. Use the returned cursor for the next request.

Reading cursor

Meter readings can share the same timestamp, so their opaque cursor combines reading_at and the reading ID. Read the value from meta.pagination.cursor and return it unchanged.
Starting with direction=asc is useful for chronological ingestion. A cursor created for one direction cannot be reused with the other direction.

Compatibility cursor

Work requests and request portals expose an encoded offset cursor through compatibility response fields:
Use nextPageUrl directly or pass nextCursor with the same filters. A final page sets both fields to null. Offset cursors reflect the current collection. Concurrent inserts, deletions, or status changes can shift later pages, so recurring synchronizations should reconcile records by ID.

Traverse a native list

Cursor rules

  • Treat every cursor as an opaque, short-lived token.
  • Keep filters, page size, direction, endpoint, and organization fixed.
  • Restart without a cursor after changing any of those values.
  • Deduplicate by resource ID in long-running or compatibility traversals.
  • Persist your own synchronization checkpoint after processing a complete page.