Skip to main content

Pagination

All list endpoints return paginated results. LumoAuth supports cursor-based and offset-based pagination depending on the endpoint.

Offset Pagination

Most admin API list endpoints use offset-based pagination:

Paginate Users
curl "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/users?limit=20&offset=40" \
-H "Authorization: ApiKey lmk_abc123"

Query Parameters

ParameterTypeDefaultDescription
limitinteger50Number of items per page. Maximum 500.
offsetinteger0Number of items to skip.

Paginated Response

List Response with Pagination
{
"items": [ ... ],
"total": 1284,
"limit": 20,
"offset": 40
}

Iterate through all pages by incrementing offset by limit until offset >= total.

SCIM Pagination

SCIM endpoints use 1-based startIndex and count parameters, as defined by RFC 7644 — SCIM Protocol (the HTTP API spec that pairs with the RFC 7643 resource schemas):

SCIM List
curl "https://app.lumoauth.dev/orgs/acme-corp/api/v1/scim2.0/Users?startIndex=1&count=100" \
-H "Authorization: Bearer <scim_token>"
ParameterTypeDefaultDescription
startIndexinteger11-based index of the first result.
countinteger100Number of results to return.
SCIM List Response
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
"totalResults": 542,
"startIndex": 1,
"itemsPerPage": 100,
"Resources": [ ... ]
}

Filtering and Sorting

List endpoints that support filtering accept a q query parameter for full-text search, and sortBy / sortOrder for ordering:

Search and Sort
curl "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/users?q=alice&sortBy=createdAt&sortOrder=desc&limit=20" \
-H "Authorization: ApiKey lmk_abc123"
ParameterDescription
qFull-text search query
sortByField to sort on (e.g. createdAt, email)
sortOrderasc or desc (default asc)