Skip to main content
List endpoints in the Aptly API return results one page at a time. Use the page query parameter to walk through all records.

Parameters

Example

Detecting the last page

The response includes a total field representing the total number of records on the board. You have reached the last page when the following is true:
Example: if total is 112 and your limit is 50, you need three pages (pages 0, 1, and 2). On page 2 you will receive the remaining 12 records.

Iterating all records

To collect all cards on a board:
  1. Fetch page 0 and read total from the response
  2. Calculate the number of pages: Math.ceil(total / limit)
  3. Fetch each subsequent page until you have all records
Avoid storing page numbers as persistent cursors. If cards are added or removed between requests, page boundaries can shift. For reliable sync, use a timestamp filter if available or reconcile by card ID after fetching all pages.