Pagination
When handling large result sets, we use a technique called cursoring. This technique segments the results into pages of a defined size, allowing you to move forward and backward through the pages.
To retrieve the cursored results, you need to pass a cursor
patameter with a value of -1
to the endpoint. If you don't provide a cursor
, the API endpoint that supports cursoring will assume that -1
was passed.
The response to a cursored request will contain current_cursor
, previous_cursor
, next_cursor
, previous_cursor_str
, and next_cursor_str
. The _str
values are provided for languages that don't support large integers (like JavaScript).
To get the next batch of responses, you should send the next_cursor
to the endpoint. Similarly, to get the previous batch, you should send the previous_cursor
. When you request the last available page of results, the API will respond with next_cursor = 0
.