Pagination
Our API uses a pagination token (marker) for all list operations to ensure efficient data retrieval. This allows clients to fetch data in small chunks, reducing the load on both the server and the client.
Parameters
The list operation uses two query parameters for pagination.
limit
: This parameter specifies the maximum number of items that should be returned in the response.marker
: This parameter is used to specify the starting point within the collection of resource items. You can find the marker in the response of the previous list request.
INFO
The marker value should be considered opaque. Although some operations use resource ID as the marker, it should not be considered part of the API contract, and the marker format may change in future API releases without notice. You should not attempt to interpret the marker other than passing it to the next list request.
Response
The list operation contains the following keys in the JSON response.
items
: This key contains the list of resource items.marker
: This key contains the pagination token for the next page of results. If there are no more results, this key is not present in the response.
Example
Here is an example of how to use the limit
and marker
parameters with the ListWorkspaces operation.
Suppose you send the following request.
GET /api/org/v1/workspaces?limit=2
You will get a response similar to the following if you have more than two workspaces in the organization. (The output has been formatted for readability.)
{
"items": [
{
"id": "..."
},
{
"id": "..."
}
],
"marker": "MARKER"
}
Pass the marker
value to the next request to get the next page of results.
GET /api/org/v1/workspaces?limit=2&marker=MARKER
Suppose you have three workspaces in total, you will get a response similar to the following. Note that marker
is absent, indicating that there is no more items to retrieve for the list.
{
"items": [
{
"id": "..."
}
]
}