Skip to content
Orion Docs
Talk to usNeed help?Get Started

API documentation

API pagination

Orion Data API v1.3 · Latest

How to page through large result sets using the offset query parameter.

Endpoints that can return large result sets are paginated. Pagination is controlled by the offset query parameter.

  • offset is the page number to return, starting at 0.
  • Each page contains up to 100 records.
  • Increase offset by one to retrieve the next page.
  • When a request returns an empty array, you have reached the end of the available data.

Retrieve the first page of results:

Terminal window
curl -X GET "https://api.oriondata.io/api/sensorData?startDate=2024-09-09&endDate=2024-09-16&offset=0&sensorIds=54321" \
-H "Authorization: Bearer $TOKEN"

Retrieve the next page by incrementing offset:

Terminal window
curl -X GET "https://api.oriondata.io/api/sensorData?startDate=2024-09-09&endDate=2024-09-16&offset=1&sensorIds=54321" \
-H "Authorization: Bearer $TOKEN"

Continue incrementing offset until the response is an empty array [].