Endpoints which return a list of objects use pagination. Pagination allows an integration to request a part of the list, receiving an array of items
, the pageNumber
and totalPages
. When totalPages > pageNumber
or hasNextPage
(more below), the next page can be fetched by incrementing the pageNumber
. The first page starts at 1
.
Requests
Each paginated endpoint accepts the following request parameters:
Parameter | Type | Description |
---|---|---|
PageNumber | number (optional) | The requested Page from the list of results. Should be between 1 and the value of totalPages . Treat this as an opaque value.Default: 1 , which does return results from the beginning of the list.Minimum: 1 Maximum: Not specified , but a page out of range will return no results. |
PageSize | number (optional) | The number of items from the full list desired in the response. Default: 10 Maximum: 100 The response may container fewer items than this number of results. |
Parameter location
For endpoints using the HTTP
GET
method, these parameters are only accepted in the query string of the request. As of right now, there are no endpoints using the HTTPPOST
method, where those parameters are accepted.
Responses
Responses from paginated endpoints contain the following properties:
Property | Type | Description |
---|---|---|
items | T[] | The actual set of results, limited to PageSize from the request. Type T depends on the resource of the endpoint. |
pageNumber | int | The currently requested page . |
totalPages | int | The total count of pages . |
totalCount | int | The total count of items , not pages . Don't confuse with totalPages . |
hasPreviousPage | bool | Helper attribute which indicates if there are results on a smaller than pageNumber . |
hasNextPage | bool | Helper attribute which indicates if there are more results on a higher value than pageNumber . |