Pagination

Canopy uses a two-factor basis to drive the order of responses in GET requests with an array of results. They are first ordered by effective_at by when the entity is effective in the system, and second by an internal index to make sure the order is always universal. From the caller's perspective, you can let Canopy know where to start its pagination response by providing a starting_after or ending_before string value. If neither a starting_after nor ending_before value is provided, we'll assume you're requesting the very first page of responses. In subsequent requests, you can simply grab these values from the paging key in the response body from your previous request. If you're aiming to provide your users with a link to the previous page, use the ending_before query parameter in your next request. If going to the next page, use the starting_after value instead.