List endpoints return a page of results and an optional token to fetch the next page.
Request parameters
| Parameter | Type | Default | Description |
|---|
limit | integer | 50 | Maximum number of items to return. |
paginationToken | string | — | Opaque token returned by the previous page request. |
Response shape
{
"items": [...],
"nextPageToken": "eyJhb..."
}
nextPageToken is only present when there are more results. When absent, you have reached the last page.
Fetching all pages
Pass nextPageToken from each response as paginationToken in the next request until no nextPageToken is returned.
async function fetchAll<T>(listFn: (token?: string) => Promise<{ items: T[], nextPageToken?: string }>): Promise<T[]> {
const all: T[] = []
let token: string | undefined
do {
const page = await listFn(token)
all.push(...page.items)
token = page.nextPageToken
} while (token)
return all
}
Last modified on June 8, 2026