list() method in the SW Combine SDK returns a Page<T> object rather than a plain array. This gives you both the items for the current page and the metadata you need to fetch subsequent pages — either manually, one page at a time, or automatically by iterating with for await...of.
The Page<T> object
When you call anylist() method, you receive a Page<T> with the following shape:
The array of items on the current page.
The total number of items across all pages.
The index of the first item on this page.
The number of items on this page.
true when there are additional pages after this one.Fetching a single page
By default,list() returns the first page of up to 50 items. You can check hasMore to decide whether to fetch more, and call getNextPage() to advance one page at a time.
Auto-paginating with for await…of
Usefor await...of to iterate over every item across all pages without managing page offsets yourself. The SDK fetches subsequent pages as needed until all items are returned.
Controlling page size and starting offset
Everylist() method accepts start_index and item_count parameters. Pass them to control which slice of results you receive.
The 1-based index of the first item to return. Most endpoints default to
1; the Events endpoint uses 0 as its default.The number of items to return per page. Controls the page size for both single-page fetches and auto-pagination.
Milliseconds to wait between automatic page fetches during
for await...of iteration. Use this to stay within rate limits when paginating large datasets.Manual pagination with getNextPage()
If you want explicit control over when the next page is fetched, usegetNextPage() in a loop instead of for await...of.
Events endpoint
The Events endpoint is the only one that uses a 0-basedstart_index by default rather than 1-based. This matches the underlying API behavior for that resource — all other endpoints start at 1.
Next steps
Rate limits
Understand the 600 requests/hour quota and how to monitor it.
Error handling
Handle failures gracefully and understand automatic retry behavior.
Quickstart
See pagination in action with a working end-to-end example.
Client modes
Choose the right client mode for your use case.