Pagination
Most listing endpoints in the API are paginated. In each paginated response, information related to the previous and next page of the result set is included.
Note: The Availability endpoint is not a listing endpoint, as it is generated on the fly. Thus the results from the Availability endpoint are not paginated. GET /webhooks is also not paginated: it returns all webhooks in a single data array.
A ?limit argument can be added to a request, in order to change the number of results on each page.
To retrieve the next page of results, use the query param ?page to specify which page.
Example:
curlcurl --request GET \
--url 'https://api.timekit.io/v2/bookings?limit=3&page=2' \
--header 'Content-Type: application/json' \
--user :live_api_key_7nzvc7wsBQQISLeFSVhROys9V1bUJ1z7
Will return:
json{
"current_page": 2,
"first_page_url": "https://api.timekit.io/v2/bookings?limit=3&page=1",
"from": 4,
"last_page": 2,
"last_page_url": "https://api.timekit.io/v2/bookings?limit=3&page=2",
"next_page_url": null,
"per_page": "3",
"prev_page_url": "https://api.timekit.io/v2/bookings?limit=3&page=1",
"to": 5,
"total": 5,
"data": [
{
"id": "c125d175-132a-499e-8beb-87f31378d5ab",
"state": "initialized",
"graph": "instant",
"completed": false,
"created_at": "2016-09-15T11:23:09+0300",
"updated_at": "2016-09-15T11:23:09+0300"
},
{
"id": "06502f41-78b3-4d03-9b6d-4c8b84e360ff",
"state": "initialized",
"graph": "instant",
"completed": false,
"created_at": "2016-09-15T11:23:09+0300",
"updated_at": "2016-09-15T11:23:09+0300"
}
]
}