Skip to Content

Pagination

Page through list endpoints with limit and offset.

Standard Shape

List operations take two query parameters:

ParameterRangeDefaultNotes
pagination.limit1–10025Values above 100 are clamped to 100, not rejected. 0 or less means the default.
pagination.offset≥ 00Number of items to skip. Negative values are treated as 0.

Videos, images, posts and support tickets return the items plus total, limit and offset. limit and offset are the values the server actually applied, so read them back instead of assuming your request was honoured. total is a 64-bit integer and is encoded as a JSON string.

curl "https://api.rixl.com/media/v1/projects/$RIXL_PROJECT_ID/videos?pagination.limit=100&pagination.offset=0" \
  -H "X-API-Key: $RIXL_API_KEY"

Walking Every Page

Request a page, add its length to offset, and stop once offset + items.length >= total or a page comes back empty.

let offset = 0;
let total = Infinity;

while (offset < total) {
  const {data, error} = await videosV1VideoServiceListVideos({
    path: {project_id: projectId},
    query: {"pagination.limit": 100, "pagination.offset": offset},
  });
  if (error) throw error;

  const page = data?.videos ?? [];
  total = Number(data?.total ?? 0);
  if (page.length === 0) break;
  // process page
  offset += page.length;
}

A runnable version is examples/10-pagination.ts in @rixl/sdk.

Ordering and Consistency

Videos and images can be ordered with sort_field and sort_direction. Other lists use a fixed server-side order.

Exceptions

These operations differ from the standard shape in v1. Check the API Reference for each response.

OperationsRequestResponseStop when
Feeds, API keys, client credentialspagination.limit, pagination.offsettotal onlyoffset + items.length >= total
Invoicespagination.limit, pagination.offsetno pagination fieldsa page is shorter than limit
Subscription historypagination.* is accepted but ignoredthe latest 100 entries, no pagination fieldsafter the first response
Memberships, membership applications, organisation memberslimit, offsetno totala page is shorter than limit
Permission registrylimit, offsettotaloffset + items.length >= total
Analytics dashboardspage, page_sizepage, page_size, totalpage × page_size >= total
Support chat messagesafter (cursor), limitno pagination fieldsa page is shorter than limit

Analytics "top" endpoints take a limit for the number of results; they are not paginated.