Pagination

The read-API list endpoints use opaque cursor pagination:

(GET /api/v1/apps/{id}/sources returns all of an app's sources and is not paginated.)

Parameters

ParamTypeDefaultNotes
limitinteger50Clamped to the range 1–100. Values below 1 or non-numeric fall back to 50; values above 100 are capped at 100.
cursorstringOpaque cursor from the previous response's pagination.nextCursor.

Response shape

Every list response includes a pagination object:

{
  "data": [ /* … up to `limit` items … */ ],
  "pagination": { "nextCursor": "Y2xpc3N1ZTAwMWFiY2QwMDAwMDAwMA" }
}

The cursor is opaque — do not parse or construct it. It encodes the last item's id and is tenant-safe: a forged cursor can only ever page within your own organization.

Walking all pages

cursor=""
while : ; do
  resp=$(curl -s "https://guardianlogs.com/api/v1/issues?limit=100&cursor=$cursor" \
    -H "Authorization: Bearer $GUARDIAN_API_KEY")
  echo "$resp" | jq '.data[]'
  cursor=$(echo "$resp" | jq -r '.pagination.nextCursor // empty')
  [ -z "$cursor" ] && break
done

Results within a page are ordered newest first (descending id).

See also: errors.md · rate-limits.md.