Skip to main content

Pagination Convention

Cursor-based pagination for all list endpoints. Not offset-based (offsets break with concurrent writes).

Request

GET /api/v1/realms/myapp/secrets?limit=50&cursor=eyJpZCI6Ij...
ParameterTypeDefaultMaxDescription
limitint25100Items per page
cursorstring(none)--Opaque cursor from previous response

Response Wrapper

{
"secrets": [...],
"pagination": {
"next_cursor": "eyJpZCI6Ij...",
"has_more": true
}
}

Rules

  • next_cursor is an opaque base64-encoded string. Clients must not parse it.
  • If has_more is false, next_cursor is omitted.
  • total count is intentionally omitted -- it's expensive for large tables and rarely needed. If a specific endpoint needs it, add include_total=true query param (opt-in).
  • Cursor encodes the last seen id + created_at for stable ordering.