Pagination
The limit and cursor parameters, the page fields and the page errors of the Platform API.
Listing operations return a page.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
limit | Query | integer | No | Items per page, from 1 to the maximum of the operation. Default 20. |
cursor | Query | string | No | The nextCursor of the previous page. Leave it out for the first page. |
Each listing operation gives its maximum limit and its order.
A page has these fields:
| Field | Type | Description |
|---|---|---|
items | array | The items on this page. Empty when nothing matches. |
nextCursor | string or null | The cursor of the next page. null on the last page. |
{ "items": [ { "contextId": "20", "type": "SIGN_IN", "name": "Guest WiFi" }, { "contextId": "31", "type": "SIGN_IN", "name": "Visitors" } ], "nextCursor": "MToyOjFlYzkxNzYy"}The first page of List contexts
with limit=2.
To read the next page, pass nextCursor unchanged as cursor. The
cursor is opaque, and it is valid only for the same operation with the
same filters. limit can differ between pages.
A cursor names the last item of its page, and the next page starts after that item in the order of the listing. An item added or removed between two pages does not shift the pages, so no item is skipped or returned twice.
A limit outside the allowed range returns 400 with the errorCode
VALIDATION_FAILED and an entry in errors for limit with the code
OUT_OF_RANGE and a detail such as Must be 1 to 100. A cursor
that is not a cursor of the operation with the same filters returns
400 with VALIDATION_FAILED and an entry for cursor with the code
INVALID_VALUE. A limit that is not a number returns 400 with
MALFORMED_REQUEST. See Invalid fields.