Pagination

Handle paginated results in the Zyllem API

API endpoints returning a list are generally paginated. In such endpoints, the results list is wrapped in a "collection" object and a sibling "paging" object is added to the response to provide pagination information. Here is an example of paginated result:

{
    "collection": [
        { /* result object here */ },
        { /* result object here */ }
    ],
    "paging": {
        "currentPage": 1,
        "itemsPerPage": 25,
        "pagesCount": 1,
        "itemsCount": 2
    }
}

To navigate to a different page, use the "page" a parameter as described below. Note that the number of elements per page is currently defined per resource and cannot be controller through the API.

GET /api/v1/items?key=my-api-key&page=4 HTTP/1.1
Host: my-company.zyllem.com
Content-Type: application/json
curl -X GET \
  'https://my-company.zyllem.com/api/v1/items?key=my-api-key&page=4' \
  -H 'content-type: application/json'