Pagination for list endpoints
Many of our list endpoints implement cursor-based pagination to allow clients to read several objects across multiple requests.
The endpoints that support pagination are:
Request
When sending requests to a paginated endpoint you may specify the max number of objects to return, the ordering behavior, and the cursor needed to return the previous or next page. All parameters are optional and should be passed as query string parameters in the URL.
Key | Description |
---|---|
limit | The maximum number of objects to return in a single request (default: 50). |
orderBy | The attribute(s) used to order objects in the response. Allowed attributes vary from object to object and are documented alongside the specific endpoint. |
order | The order direction. One of: asc or desc . |
beforeCursor | The cursor used to fetch the previous page of objects. This value is returned in the response body of paginated endpoints. |
afterCursor | The cursor used to fetch the next page of objects. This value is returned in the response body of paginated endpoints. |
Response
Paginated endpoints return metadata about the results under the metadata
property. The cursor values may be used in subsequent requests to fetch previous or next pages.
Key | Description |
---|---|
total | The total number of objects available to read. |
beforeCursor | The cursor value to read previous page of results. This value should be passed in the query string of a subsequent request. If there is no previous page this value will be null. |
afterCursor | The cursor value to read the next page of results. This value should be passed in the query string of a subsequent request. If there is no next page this value will be null. |
Updated about 1 month ago