All top-level API resources have support for bulk fetches via "list" API methods. For instance, you can list Users, list Portals, and list Roles. These list API methods share a common structure, taking at least these two parameters: limit, after.
The response of a list API method represents a single page in a chronological stream of objects. If you do not specify
after, you will receive the first page of this stream, containing the oldest objects.
In each page, the value to be used to get to the next page in the
afterparameter is supplied.
See an example of paginated response that returns 2 items:
"name": "Admin Builder",
"after": "MQit=" // This should be the value to use in the `after` parameter to get to the next page
You are at the end of the pages when the
afterparameter is not longer returned in the responses.