Skip to main content

Overview

Caspen APIs use cursor-based pagination. Each paginated response includes links.prev and links.next entries with fully qualified URLs. When another page is unavailable, the corresponding link is null.

Request parameters

Response structure

Every paginated response returns the resource collection plus a links object that guides you to neighbouring pages.
  • links.prev: URL for the previous page or null when you are at the beginning of the dataset.
  • links.next: URL for the next page or null once you have reached the end.

Fetching the next page

  1. Request the first page, optionally setting limit to control page size.
  1. Read links.next from the response. If it is not null, issue another request using that URL verbatim.
Repeat this process until links.next becomes null.