Overview
Rewrite list endpoints use cursor-based pagination. Every paginated response returns:data: the current page itemscursor: pagination state for the next or previous request
Response format
Cursor fields
persist: Whether more results exist.next: Cursor to use for the next page.prev: Cursor to use for the previous page.
- Treat
cursor.nextandcursor.prevas opaque values.
Query parameters
after: Fetch results after a given ID.before: Fetch results before a given ID.limit: Number of items to return (2 to 100).
Forward pagination
Useafter to move forward.
Backward pagination
Usebefore to move backward.
Common mistakes
- Using before and after
- Inferring the end from length
- Treating cursors as generated values
Do not send
before and after in the same request.