Lune Docs Logo

Pagination

Results from GET endpoints are paginated using cursor-based pagination. This means that subsequent requests may need to be made in order to get the entire list of results.

How it works

There are two important properties in every response for pagination:
  • has_more : If true, more results can be fetched. If false, all the results have been retrieved.
  • next_cursor: If more results are available, use this value for the query parameter after in the request, after= next_cursor value.
Page size
By default, each page returns 10 objects. You can adjust the number of results by setting the limit query parameter, up to a maximum of 100 objects per page.
Example
If the response is returned as such:
  • Pagination results
  • The query parameters to retrieve the next page of results would be:?after=48601af52aef3968e4730fbf60589e2e2852ed23If you’d like the results to be returned 25 at a time, adjust the query parameters like so:?after=48601af52aef3968e4730fbf60589e2e2852ed23&limit=25