Conventions
Pagination
Page + limit pagination shape used by all list endpoints
List endpoints use offset pagination with page and limit query
parameters.
Request
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | 1-based page number. |
limit | integer | 10 | Items per page. Most endpoints cap at 100. |
GET /api/events?page=2&limit=25
Authorization: Bearer tke_live_...Response envelope
{
"data": [
/* ... resources ... */
],
"total": 248,
"page": 2,
"limit": 25,
"totalPages": 10
}| Field | Type | Description |
|---|---|---|
data | array | The page of resources. |
total | integer | Total matching records across all pages. |
page | integer | The page that was returned. |
limit | integer | The page size that was applied. |
totalPages | integer | ceil(total / limit). |
Walking all pages
async function* allEvents(client) {
let page = 1;
while (true) {
const res = await client.get(`/events?page=${page}&limit=100`);
yield* res.data;
if (page >= res.totalPages) return;
page += 1;
}
}For very large result sets, prefer narrower filters (status, tourId, date ranges) over walking
every page — server-side filters are always cheaper.
Sorting
Sorting is endpoint-specific. Where supported, list endpoints accept
sortBy and sortDir=asc|desc. See the individual endpoint docs.