Pagination Query Parameters
- pageSize: This parameter determines the number of results per page. Togai supports up to 100 results per page.
- nextToken: By providing a
nextToken
, you can retrieve a page of objects occurring immediately after the last object from the latest list.
These list APIs accept few other query parameters to support Filtering, Searching and Sorting. Refer Filtering, searching and sorting page for more information on that topic.
Retrieving Results
The response from a list API represents a single page list of objects. If you do not input anextToken
, you will receive the first page of this stream.
The result contains data
which is a list of requested entity objects and nextToken
Example Usages
Retrieving first page of results
To list customers, make a GET request to the following endpoint:nextToken
. If this is a last page, nextToken
will be null
.
At times, the last page can return a non-null
nextToken
. This means, you will make one extra API call to receive an empty list with a nextToken
as null
to ascertain that you have read all of the results.Limiting Results
If youβd like to limit the number of results per page, you can specify apageSize
. For example, to get only 10 results per page:
Retrieving next pages
To retrieve the next page of customers, you would include thenextToken
obtained from the previous response:
pageSize
and other parameters passed to fetch the first page are not required to be passed in consecutive requests as this information is available within the nextToken
and will be conidered when returning next pages.