By default, all “List” endpoints return paginated results. You can control pagination using these query parameters:

  • cursor: The cursor pointing to the start of the next page (omit for first request)
  • limit: The number of items to return per page (default: 25, max: 100)

Request Example

GET /api/v1/items?limit=50&cursor=eyJpZCI6MTAwfQ==

This request fetches up to 50 items, starting from the item identified by the cursor.

Response Headers

Each paginated response includes the following headers:

  • X-Next-Cursor: The cursor value to retrieve the next page of results. If null or empty, there are no more pages.
  • X-Page-Size: The number of items returned in this response.

Usage Notes

  1. For the initial request, omit the cursor parameter.
  2. For subsequent requests, use the value from X-Next-Cursor header as the cursor query parameter.
  3. If X-Next-Cursor is empty or not present in the response, you’ve reached the end of the dataset.
  4. While we attempt to respect the limit parameter, you may occasionally receive fewer or more records than requested.
  5. Continue pagination until you receive an empty X-Next-Cursor header to ensure no records are missed.

Example Workflow

  1. Initial request:

    GET /api/v1/items?limit=50
    
  2. Server response headers:

    X-Next-Cursor: eyJpZCI6NTB9
    X-Page-Size: 50
    
  3. Next request:

    GET /api/v1/items?limit=50&cursor=eyJpZCI6NTB9
    
  4. Repeat steps 2-3 until X-Next-Cursor is empty or not present in the response.