Pagination

Resource collections in novomind iPIM Supply REST API can be accessed in pages. To easily navigate through these paged resources, every response contains a "totalPagesCount" field with additional information and links to the next and previous page.

See this example:

{
  "totalEntitiesCount": 7,
  "count": 2,
  "type": "catalogs",
  "totalPagesCount": 4,
  "_links": {
    "first": {
      "href": "/api/catalogs.json?context=default&limit=2&offset=0&page=1",
      "title": "Erste Seite"
    },
    "previous": {
      "href": "/api/catalogs.json?context=default&limit=2&offset=0&page=1",
      "title": "Vorherige Seite"
    },
    "self": {
      "href": "/api/catalogs.json?context=default&limit=2&offset=2&page=2",
      "title": "Aktuelle Seite"
    },
    "next": {
      "href": "/api/catalogs.json?context=default&limit=2&offset=4&page=3",
      "title": "Nächste Seite"
    },
    "last": {
      "href": "/api/catalogs.json?context=default&limit=2&offset=5&page=4",
      "title": "Letzte Seite"
    },
    "custom": {
      "href": "/api/catalogs.json?context=default{&filter*,include,limit,offset,page,sort}",
      "templated": true
    }    
  },
  "_embedded": {...}
}

The response returned page 2 of 4 pages with total 7 elements. There is a "next" link to the next page and a "previous" link to the previous page. If these links are missing, there are no more pages into that direction.

Limit resources per page

There is a request parameter called "limit" that can be attached to a request and controls how many resources are delivered with each page. The default is 10.