Using pagination in the REST API
When a response from the REST API includes many results, the response will paginate the results and return a subset of the results. For example, GET /groups
will only return 10 groups even though the amount of groups on your account includes over 100 groups.
Query Parameters
You can use query parameters to control the pagination of results. The following query parameters are available:
Name | Type | Description |
---|---|---|
skip | number | The number of results to skip, is defined by the page number plus the limit of previous responses. Default: 0 |
take | number | The number of results to take, changing the limit of results per page. Default: 10 |
Response Body
When using pagination in the REST API, the response body will include a pagination
object and a data
object. The pagination
object will include information about the current page, the total number of pages, the limit of results per page, and the total number of results. The data
object will include the results for the current page.
Name | Type | Description |
---|---|---|
pagination | object | Object containing pagination information. |
pagination.page | number | The number current page. |
pagination.totalPages | number | The total number of pages. |
pagination.limit | number | The limit of results per page. |
pagination.total | number | The total number of results. |
data | array or object | The results for the current page. |
Example:
{
"pagination": {
"page": 1,
"totalPages": 10,
"limit": 10,
"total": 100
},
"data": []
}