Skip to main content
Skip table of contents

Pagination

Pagination is required when there are more matching results than the pageSize defined for a resource.

Endpoints using pagination will accept the following parameters:

pageSize: the max number of items returned in a single response. If no value is set for this parameter, the default value of 100 will be used. Max allowed pageSize is 10000.

pageToken: set to the value of “forwardToken” from the previous request’s response, to get the next page of the results. Set the value of “backwardToken” for the previous page of results. This parameter will not have any value for the initial request.

SortBy: name of the field the response should be sorted by. For most scenarios, this can be left out, falling back to the default value.

sortDir: the direction to sort the response by. Can be set to “asc” for ascending direction, or “desc” for descending direction. The default value is “asc”.

Response from endpoints that support paging will include the following values, as HTTP headers:

x-totalHits: the total number of items in the result.

x-forwardToken: an opaque string that should be passed as the pageToken parameter to get the next page of the results. If this response header is not present, you have all the results, and no more pages are available.

x-backwardToken: an opaque string that should be passed as the pageToken parameter to get the previous page of the results.

Note 1: Pagination tokens (i.e. x-forwardToken and x-backwardToken) have a lifetime of 10 minutes, so subsequent calls must be made within this time span. If the token has expired, then the pagination will reset, and the response will return the first page again.

Note 2: Pagination sessions have a lifetime of 4 hours. This means that getting all the results from the first page to the last page must be done within this time span. If the session has expired, then the pagination will reset, and the response will return the first page again.

Note 3: Please be aware that if any search parameter is modified, including filters, pageSize, sortField, or sortOrder, the request will be considered as a new initial request. This means that the search process will be restarted, and any previous page or context will be disregarded. To ensure accurate and consistent results, it's essential to maintain the integrity of the original search parameters throughout the pagination process. 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.