Pagination
Pagination
The CAMS API uses cursor based pagination using the following query parameters:
afterA cursor for use in pagination.afteris the token of the last item retrieved from the previous page. By placing theaftertoken in the argument, you are requesting the list after that cursor.limitA string representation of an integer that defines the maximum number of list items to return in the response. The maximumlimitallowed is dependent on the server's maximum setting.
Paginated Responses
Not all queries are paginated. Those which are will return a response with the following format: {items: [ Items ],after: "c3f7d835-795d-4ce3-ac1b-2b1e288be8b0",totalCount: 100,}
itemsThe items are the data in the current pageafterThis field in the response can be used directly in place of theafterquery parameter to retrieve the next page of data in the list. It will correlate directly to the token of the last item in the listtotalCountThetotalCountfield is the total number of items in the entire data set
Last page
If the after field returned in the query is null, this means you have retrieved the last page in the data set, and no more items are available.
Filters and Sorting
Note that the pages in a list only correlate to one another should the filters and sorting remain the same for all queries. Should either change, the paging process will likely need to be restarted.
Last updated