Pagination

Whenever the Loka API response returns a list of objects (20 by default), no matter the amount, pagination is supported. In paginated responses, arrays of objects are nested in a _embedded attribute with an additional page object at the end of the response indicating pagination details.

The maximum objects returned in a single page cannot exceed 20.

Page response

"page": {
  "size": 20,
  "totalElements": 52576,
  "totalPages": 2629,
  "number": 0
}

In addition, a _links object is returned that provides examples of pagination calls:

Links response

"_links": {
  "first": {
    "href": "http://api.lokamc.com/players?page=0&size=20"
  },
  "self": {
    "href": "http://api.lokamc.com/players"
  },
  "next": {
    "href": "http://api.lokamc.com/players?page=1&size=20"
  },
  "last": {
    "href": "http://api.lokamc.com/players?page=2628&size=20"
  }
}