Collection endpoints (list endpoints such as POST /gql/v1/clients) use limit/offset pagination controlled by two body parameters.
| Parameter | Meaning |
|---|---|
pageSize | A limit: how many records to return. Default 50, maximum 1000. |
page | An offset: how many records to skip. It is not a 0-based or 1-based page number. |
To read the next block of records, advance page by pageSize.
Every collection response includes an aggregate count:
{
"total": { "aggregate": { "count": 25156 } }
}Use total.aggregate.count to know how many records exist. When page is greater than or equal to that count, the data array comes back empty.
With 25,156 clients and pageSize: 1000:
| Request | Records returned |
|---|---|
pageSize: 1000, page: 0 | records 1–1000 |
pageSize: 1000, page: 1000 | records 1001–2000 |
pageSize: 1000, page: 25000 | records 25001–25156 (156 rows) |
pageSize: 1000, page: 25156 | empty array |
Do not send page: 26 expecting "page 26" of 1,000-record pages. That skips only 26 records and still returns a full pageSize of results.
This limit/offset model is the stable v1 contract and will not change. A future API version may introduce conventional page-number pagination under a new version prefix.
These endpoints use a zero-based page number instead of the offset model above.
GET /api/v1/event-subscriptions and GET /api/v1/event-subscriptions/{id}/deliveries take two optional query parameters:
| Parameter | Meaning |
|---|---|
page | Zero-based page number. Default 0; must not be negative. |
limit | Page size. Default 50, between 1 and 1000. |
An out-of-range page or limit returns 400. data is a page:
{ "content": [], "totalElements": 0, "totalPages": 0, "currentPage": 0, "hasNext": false, "hasPrevious": false }POST /api/v1/codes/batch/{type}, POST /api/v1/entries/batch/{type}, the per-type code lookups (POST /api/v1/time-codes/batch, /api/v1/expense-codes/batch, /api/v1/operational-codes/batch and /api/v1/pto-codes/batch) and the per-type entry lookups (POST /api/v1/time-entries/batch, /api/v1/expense-entries/batch, /api/v1/operational-entries/batch and /api/v1/pto-entries/batch) take a body such as { "pageSize": 25, "page": 0 }:
| Parameter | Meaning |
|---|---|
pageSize | Records per page, 1 to 100. Default 25; a value outside that range returns 400. |
page | Zero-based page index (default 0). The lookup skips page * pageSize records. |
A page beyond the last record returns no records.