Skip to main content

Overview

All list() methods return a Page<T> object. Every page includes the data list, metadata about the total result set, and links to the next/previous page.

The Page Object

All model fields in Java records are accessed via method calls (e.g. page.meta().total(), not page.meta().total).

Manual Pagination

Control pagination yourself with page and perPage parameters:

Auto-Pagination with iter()

Every resource exposes an iter() method that automatically fetches all pages and yields individual items:
Internally, iter() uses PageIterator<T>, which calls list() repeatedly and follows links().next() until there are no more pages.
Use iter() whenever you need all items. It handles pagination transparently without loading the full result set into memory at once — each page is fetched only when the previous one is exhausted.

Collecting into a List

If you need all results in a List, iterate and collect:
Or with streams:

Early Stopping

Break out of an iter() loop at any point — no extra pages are fetched after the break:

Progress Reporting


Pagination Parameters

ParameterTypeDefaultDescription
pageint1Page number (1-indexed)
perPageint20Items per page (max 100)