Skip to main content
Pagination in the WaaS 2.0 API allows you to retrieve data in manageable chunks. You can control the page size and navigate through the dataset using three query parameters:
  • limit: This parameter defines the maximum number of objects you want to receive in each response.
  • before: A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. Suppose the current data is ordered as Object A, Object B, and Object C. If you set before to the ID of Object C (RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk), the response will include Object B and Object A.
  • after: A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. Suppose the current data is ordered as Object A, Object B, and Object C. If you set after to the ID of Object A (RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk), the response will include Object B and Object C.
Notes:
  • If you set both after and before, an error will occur.
  • If you leave both before and after empty, the first page of data is returned.
  • If you set before to infinity, the last page of data is returned.
Feel free to share your feedback to improve our documentation!