Dividing large volumes of data returned by some endpoints into smaller chunks
Overview
When an endpoint returns a list of objects, pagination allows you to partition the dataset instead of accessing all the records at once.
Endpoints that implement pagination have the following optional query parameters:
Parameters page
and pageSize
allow you to iterate between pages.
Some endpoints use the sortBy
parameter, which is a String containing both the sorting direction and the name of the sort-by field.
Other endpoints use two sort parameters:
direction
- a String Enum indicating sort direction.field
- the name of the sort-by field
Pagination parameters
Name | Type | Description |
---|---|---|
page | Integer | Page to search. Page numbering starts with 0. |
pageSize | Integer | Number of documents that will be returned per page. Determines the maximum size of each page. The default is 20. |
sortBy | String | Controls the sorting. Format: <field_name>.<asc|desc> (asc for ascending order, desc for descending order). If no order is specified, it will be in descending order. |
direction | String Enum | Sort direction. "ASC" for ascending or "DESC" for descending. |
field | String | Name of the sort-by field |