Operating Model:
Operating Model:

Pagination, sorting, and meta information

This guides explains how pagination, sorting, and meta information works and how they can be used.

Pagination

Endpoints that expose lists of resources may be paginated. This means that if there are many resources, they can be retrieved in segments divided into pages rather than in a single result. See API reference for details.

A common method of paginating is to use the following query parameters:

Query parameter Purpose
limit Number of items per response. Maximum allowed is 10000. Default is 1000
offset Offset value in the main list at which the maximum of limit items from the list should be returned. Default is 0
INFO

If you do not specify either of these parameters, you will get a list with a maximum of 1000 entries and an offset of 0 (i.e. the beginning of the list).

Sorting

Some endpoints allow you to define the sorting order of the returned list. Each endpoint specifies the allowed fields by which lists can be sorted. Check API reference for more details.

Query parameter Purpose
sort Field name of the single resource by which a list is to be sorted.
order Sorting order. Either ASC or DESC for ascending or descending sorting order respectively. Default is ASC.

Meta information

Each endpoint that allows pagination contains a response with the fields meta and data.

The meta field contains relevant meta information about the returned list.The data field contains all resource information defined in the endpoint descriptions section.

The meta field for a list of resources contains the following information:

Field name Description
offset Quantity of resource to be offset in the response.
limit Total limit of the response.
count Number of resources returned in the response.
total_count Total number of all resources.
sort Field by which a list is sorted.
order Sorting order of the response (ASC or DESC).

Was this page helpful?