API Documentation

v1.0.0

Pagination

The pagination of our REST API is standardised over all of our API endpoints.

In essence, every list endpoint requires you to send the following Query parameters:

- pagination[size]: Determines the amount of resources returned in a page. Minimum 1, maximum: 250.
- pagination[page]: The current page being requested. Starting at 0.

Each list endpoint will always return the following information:

...

state: {
    pagination: {
        total_pages: 15,
        current_page: 0,
        page_size: 10,
        total_count: 150
    }
}
...

This will allow you to trust the response with the responsability of keeping track of this information, so your UI does not have to keep this in memory upon request.

Detecting APIs that support higher maximums

Some API endpoints might support a higher maximum than 250 resources per page.

This can be found in the documentation, or by calling the endpoint you want to use with the OPTIONS method.

If the OPTIONS method returns the header 'X-Pagination-Max-Resources', it supports a higher amount (passed in the header). If the header is not present, the standard maximum is defined.

This header can be used to both increase and decrease the total amount of resources.


Last edited on: February 03, 2022