Page through collection results
Follow opaque cursors across deterministic Gridstate collections.
Request a bounded page, follow meta.nextCursor, and stop when meta.hasMore becomes false.
Request the first page
Pass a limit from 1 to 500:
curl -G "$GRIDSTATE_API_BASE/v1/queue-records" \
-d limit=500 \
-H "Authorization: Bearer $GRIDSTATE_API_KEY" \
-H "Gridstate-Version: 2026-08-24"Collections return a stable envelope:
{
"data": [],
"meta": {
"hasMore": true,
"limit": 500,
"nextCursor": "opaque_cursor_value",
"order": "id_asc"
}
}Request the next page
Pass the returned cursor without changing it:
curl -G "$GRIDSTATE_API_BASE/v1/queue-records" \
-d limit=500 \
-d cursor="$NEXT_CURSOR" \
-H "Authorization: Bearer $GRIDSTATE_API_KEY" \
-H "Gridstate-Version: 2026-08-24"Stop at the final page
Continue while meta.hasMore is true. The final page sets hasMore to false and does not require another request.
Treat cursors as opaque
Do not construct, decode, or edit a cursor. A cursor binds the filters and sort state that produced it. Start a new first-page request after changing filters.
Gridstate orders collection pages deterministically with id_asc, so cursor traversal remains stable while new records arrive.