Pagination
How to handle collections
Collection resources will always contain a paginated response and allow the use of offset and limit to provide pagination functionality to the client.
curl https://olympics.api.pamedia.io/v3/collection?limit=20&offset=0
{
"limit": 20,
"offset": 0,
"hasNext": false,
"hasPrevious": false,
"items": [...]
}
Field | Description | Value Type |
---|---|---|
limit | The limited request parameter | Integer |
offset | The offset request parameter | Integer |
hasNext | Flag to indicate there is more data on next page | Boolean |
hasPrevious | Flag to indicate there is more data on previous page | Boolean |
items | The array of requested objects | Array[Object] |
The 'limit' parameter is typically used with the 'offset' parameter to facilitate pagination. Each resource that exposes a collection has a limit to what the limit can be set to. This information can be found in the API reference.
The following table identifies the pagination limits for each resources, should a request be made over these limits a 400 Bad Request response will be returned.
Updated 6 months ago
What’s Next