Server-side pagination
Our integration APIs support server-side pagination, a technique used to handle large sets of returned data.
It allows you to split the results into smaller pages, making it more efficient to process and display large volumes of data.
QUERY
Parameter | Description | Type | Required |
---|---|---|---|
$count | Returns the total number of items matching the query. | boolean | No |
$pagesize | Returns the number of records allowed per page. - Default value applied to all calls: 500 - Maximum limit: 500 | integer | No |
If you want to obtain the pagination links for the data, you must enable $count
. If this is not enabled, the return of records will be limited to the value of $pagesize
and a link to search for the other records, if they exist, will not be generated.
Based on the information in the response, you can adjust the parameters to retrieve different pages from the result set.
Request example
Search for a list of printers with the following specifications:
- Include the total count of available printers that meet the query criteria (
count=true
). - Limit the list of printers returned to 5 results per page (
pagesize=5
).
curl -L -X GET ‘/v1/printers?%24count=true&%24pagesize=5’ \
-H ‘Authorization: Bearer <token>’ \
-H ‘Tenant: <tenant>’ \
-H ‘Accept: application/json’ \
-d ‘’
Response example
The response code 200 indicates that the search was successful and will return the JSON with the searched data according to the selected pagination:
{
"items": [
{
"id": "123",
"displayName": "ZYX",
"agent": "NDD - Printer Monitor"
},
{
"id": "456",
"displayName": "WVT",
"agent": "NDD - Printer Monitor"
},
{
"id": "567",
"displayName": "SRQ",
"agent": "NDD - Printer Monitor"
},
{
"id": "890",
"displayName": "PNM",
"agent": "NDD - Printer Monitor"
},
{
"id": "321",
"displayName": "LKJ",
"agent": "NDD - Printer Monitor"
}
],
"nextPageLink": "/v1/printers?$count=true&$pagesize=5&$skip=5",
"count": 27
}
The nextPageLinkparameter
contains a link to the next page if there are more records available, and the count
parameter indicates the total quantity of records found.