Overview
Queries against the collection endpoints can return large numbers of results. To improve performance and make the data more consumable, these endpoints use pagination to break up large responses.
These endpoints optionally take page and page size parameters as part of the query string. For example, the following request against the offences endpoint...
https://api.playsafeid.com/v1/offences/<user_id>?page=3&page_size=10
...will return Page 3 of 10 offences for the user with the specified ID (ordered by time created). Information on which endpoints use pagination can be found on their respective pages in the API reference.
The default page size is 20, and the maximum is 100.
Paginated Responses
Paginated endpoints return some extra metadata about the paginated collection as part of the response, to assist in managing paginated operations.
{
"objects": [
...
],
"total_pages": 0,
"total_objects": 0
}
The following is a summary of the meaning of these pieces of data:
Field | Description |
---|---|
total_pages | The total number of pages available in the collection, for the given parameters. |
total_objects | The total number of objects (users, offences, etc.) available in the collection, for the given parameters. |