Skip to navigation

Pagination

API methods that can deliver lists of results typically support paginated responses. This allows you to retrieve large sets of data in smaller, more manageable chunks. Eon uses cursor-based pagination, where each page of results includes a cursor that you can use to request the next page of results.

Although this article covers how to use pagination in Eon API methods in general, always use the reference pages for your specific method.

Requests

The pagination request parameters are consistent across all paginated methods, although depending on the API method, they may be query parameters or in the request body in the queryParams object. Behavior is the same, regardless of where the parameters are located.

If you request a filtered or sorted list of results in the first page, you’ll need to include the same filters and sorting options in subsequent pages, along with the nextToken returned in the previous response.

Request parameters

ParameterDescription
nextToken
string
Token that points to the first record in the next page of results. For example, if your first request had a page size of 100, this token points to record 101. This token is never used in the first request.
pageSize
integer
Number of items to return in the response.
In a request body
{
"sorts": [ ... ],
"filters": { ... },
"queryParams": {
"nextToken": "GDcVsHpjeGbudx0Ks0KWg6u8VD4c3Dzr9gWrOQfkZkuQlskfgHJ2E1JSOSIHQEZ2",
"pageSize": 50
}
}
In query parameters
?pageSize=50&nextToken=GDcVsHpjeGbudx0Ks0KWg6u8VD4c3Dzr9gWrOQfkZkuQlskfgHJ2E1JSOSIHQEZ2

Responses

The response to a paginated request includes the requested array of results and a nextToken that you can use to request the next page of results.

Response object
{
"results": [ ... ],
"nextToken": "GDcVsHpjeGbudx0Ks0KWg6u8VD4c3Dzr9gWrOQfkZkuQlskfgHJ2E1JSOSIHQEZ2"
}