Pagination

Learn how to navigate with paginated results

Pagination filters

Livestorm's public API uses pagination for list endpoints. Each paginated endpoint can be manipulated using 2 filters:

  • page[number] (optional): The current page's index, which starts at 0 by default.
  • page[size] (optional): The page size (or number of items that must be returned) which will be 20 by default. The maximum allowed value is 50.

Here's an example of an API call using these filters:

curl 'https://api.livestorm.co/v1/events?page\[number\]=2&page\[size\]=10' \
  -H 'authorization: YOUR_API_TOKEN'

Response format

Each paginated endpoint will return a JSON payload that contains 2 top-level attributes:

{
  "data": [],
  "meta": {
    "record_count": 0,
    "page_count": 0,
    "items_per_page": 20
  }
}

data

The actual array of data returned for this endpoint.

meta

This attribute will contain 2 sub-attributes that will give you context about pagination:

  • record_count: The total number of items for this endpoint with the specified filters.
  • page_count: The number of pages available for the specified filters.
  • items_per_page: The total number of items sent per page (default would be 20).

Did this page help you?