Offset Based Pagination (Deprecated)
In the offset-based approach, pagination in a collection can be controlled using the page[number
] and page[size]
query parameters. For instance, to retrieve the second page of events, use the page[number]
parameter:
https://api.eventtemple.com/v2/events?page[number]=2
To limit the number of items on each page, use the page[size]
parameter:
https://api.eventtemple.com/v2/events?page[size]=1
Both parameters can be used together to fine-tune the pagination like this:
https://api.eventtemple.com/v2/events?page[size]=10&page[number]=1
Default and Max Page Size
By default, the page size for pagination is set to 25. However, you can set a custom page size by using the page[size] query parameter in the API request. Keep in mind that the maximum allowed page size is 100 unless otherwise specified by the API documentation or the server.
The Meta member of the response Response Object object contains information about the collection, including the total number of records and pages.
{
"data": [
...
],
"included": [
...
],
"meta": {
"pages": 1,
"records": 21
}
}
Updated 6 months ago