Pagination¶
Certain API calls return a paginated result set. The default number of records returned is 25 and the maximum is 100 unless specified differently in the endpoint’s description. You may pass in the limit and page query string parameters to control pagination.
Paginated result calls will return a JSON response body with the properties data
and meta
. The data
property will contain an array with the records. The meta
property will contain pagination information.
Body Parameters | Properties | Type | Description |
---|---|---|---|
data | Array | The records | |
meta | Object | ||
-> | count | Integer | The total number of records that the endpoint would return if there was no limit in place |
-> | limit | Integer | The limit applied to the endpoint |
-> | total_pages | Integer | The total number of pages required to return all records at the given limit |
-> | previous_page | String | The link identifying the API request returning the previous page of records at the the given limit (if there is no previous page, this link will not be returned) |
-> | next_page | String | The link identifying the API request returning the next page of the records at the the given limit (if there is no next page, this link will not be returned) |
Examples¶
curl -H "Authorization: Bearer [Token]" \
-i https://v2.api.uberflip.com/hubs?limit=2&page=2
Sample response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": [
{
...
},
{
...
}
],
"meta": {
"count": 6,
"limit": 2,
"total_pages": 3,
"previous_page": "https://v2.api.uberflip.com/hubs?limit=2&page=1",
"next_page": "https://v2.api.uberflip.com/hubs?limit=2&page=3"
}
}