Most API resources that have a
list method will allow for pagination of result sets. Each of these methods have a standard set of results to control paginating the resource. When querying a
list method, you will receive a field on the response called
nextPageToken which will give you the token to use to retrieve the next page of results. If there are no further results for the given request, then an empty string
"" will be returned for this value.
When making the next
list request, simply pass in the
nextPageToken value as
pageToken in the request to get the next set of results.
nextPageToken is returned by the endpoint, then there may be more results regardless of whether or not the returned result set contains items. Users MUST call the
list method with each subsequently returned
nextPageToken until the
nextPageToken is empty if they want to ensure that they have received all results.