The Leen API supports cursor-based pagination to help you efficiently navigate through large datasets. Follow these steps to implement pagination using our API.
Currently supported endpoints:
To enable pagination, include the query parameter enableCursor=true
in your initial request.
When pagination is enabled, the API response includes two keys:
next_cursor
: The cursor for the next page.previous_cursor
: The cursor for the previous page.Here’s an example response:
To navigate between pages, pass the appropriate cursor value in the cursor
query parameter:
next_cursor
from the response.previous_cursor
from the response.updatedSince
filter in your first request, do not include the updatedSince
query parameter in subsequent requests that use a cursor
query parameter. Combining these parameters will cause the API to return a 422 error.next_cursor
is null
, you’ve reached the end of the dataset.previous_cursor
is null
, you’re at the beginning of the dataset.By following these steps, you can seamlessly implement pagination in your application using the Leen API.
limit
parameter is unchanged and can still be used with cursor pagination to control the page size.The Leen API supports cursor-based pagination to help you efficiently navigate through large datasets. Follow these steps to implement pagination using our API.
Currently supported endpoints:
To enable pagination, include the query parameter enableCursor=true
in your initial request.
When pagination is enabled, the API response includes two keys:
next_cursor
: The cursor for the next page.previous_cursor
: The cursor for the previous page.Here’s an example response:
To navigate between pages, pass the appropriate cursor value in the cursor
query parameter:
next_cursor
from the response.previous_cursor
from the response.updatedSince
filter in your first request, do not include the updatedSince
query parameter in subsequent requests that use a cursor
query parameter. Combining these parameters will cause the API to return a 422 error.next_cursor
is null
, you’ve reached the end of the dataset.previous_cursor
is null
, you’re at the beginning of the dataset.By following these steps, you can seamlessly implement pagination in your application using the Leen API.
limit
parameter is unchanged and can still be used with cursor pagination to control the page size.