List resources in the API are paginated by default to allow clients to traverse data over multiple requests. In most cases we're geared towards a default pagination limit of 10 resources per page which can be overridden via ?limit=<number>&page=<page number> query parameters. Pagination can also be toggled off via ?limit=0 query string

List resources in the API are paginated by default to allow clients to traverse data over multiple requests. In most cases we're geared towards a default pagination limit of 10 resources per page which can be overridden via ?limit=<number>&page=<page number> query parameters.

The Maxihost API provides a Link header according to RFC5988 that can be used to retrieve the next page.

Here's an example response header from requesting the third page of servers:
Link: <https://api.maxihost.com/devices?page=3>; rel="next"

If the Link header is blank, that's the last page. The Maxihost API also provides the following pagination totals

HeaderDescription
X-Total-CountTotal number of resources you're fetching
X-Total-PagesThe total number of pages

The API also provides links and meta/pages nodes that provide additional pagination data. Here's an example from requesting ?page=2 of devices

"links": {
        "first": "https://api.maxihost.com/devices?limit=2&page=1",
        "last": "https://api.maxihost.com/devices?limit=2&page=10",
        "next": "https://api.maxihost.com/devices?limit=2&page=3",
        "prev": "https://api.maxihost.com/devices?limit=2&page=1",
        "self": "https://api.maxihost.com/devices?limit=2&page=2"
    },
"meta": {
    "pages": {
        "count": 2,
        "total": 10
    }
}
namedescription
firstThe first page. Included when the current page is greater than 1
lastThe last page
nextThe next page. Included when there's a next page
prevThe previous page. Included when there's a previous page
selfThe current page
meta/pages/countThe total number of resources
meta/pages/totalThe total number of pages