ListDatasetVersions
Performs a paged query to retrieve the historical versions of a dataset in a specified agent space and returns the version names, descriptions, and creation time. Deleted versions are not returned in the list. Do not specify nextToken in the first request. For subsequent requests, use the nextToken from the previous response to continue paging.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
agentloop:ListDatasetVersions |
list |
*Dataset
|
None | None |
Request syntax
GET /agentspace/{agentSpace}/dataset/{datasetName}/version HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| agentSpace |
string |
Yes |
The name of the agent space to which the dataset belongs. Specify the name of an existing agent space that you have permissions to access. |
my_agent_space |
| datasetName |
string |
Yes |
The name of the dataset. You can call ListDatasets to obtain the name. The name must be 4 to 63 characters in length, start with a lowercase letter, and contain only lowercase letters, digits, and underscores. It cannot end with an underscore or contain consecutive underscores. |
product_faq_dataset |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| maxResults |
integer |
No |
The maximum number of versions to return per page. Valid values: 1 to 100. Default value: 100. The actual number of returned versions may be less than this value. |
20 |
| nextToken |
string |
No |
The pagination token for the next page. Do not specify this parameter in the first request. To query subsequent pages, pass the nextToken value from the previous response as is, and keep the agent space and dataset name unchanged. The example is for demonstration purposes only. Use the actual token returned by the API operation. |
umaQfI7x758Ns4TgWrj8yA3fYlnk7dJgsfhMrSViRY8= |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response information returned when the request succeeds. |
||
| requestId |
string |
The unique identifier of the request, which is used to locate and troubleshoot issues. |
D17DE39E-6C62-50E3-9EB7-FDE41BB0D43D |
| nextToken |
string |
The pagination token for the next page. This parameter is returned when a next page exists. To query the next page, pass this value as is to nextToken. If this parameter is not returned or is empty, no next page exists. The example is for demonstration purposes only. |
umaQfI7x758Ns4TgWrj8yA3fYlnk7dJgsfhMrSViRY8= |
| maxResults |
integer |
The maximum number of versions per page used for this query, which is not the actual number of versions returned on the current page. |
20 |
| total |
integer |
The total number of versions of the dataset, excluding deleted versions. This value is not limited by the current page size. |
35 |
| versions |
array<object> |
The list of historical versions of the dataset on the current page. An empty array is returned if no versions meet the conditions. |
|
|
object |
The information about a single historical version of the dataset. |
||
| version |
string |
The name of the historical version, which corresponds to the name specified when the version was created. This value can be used as the version parameter for DeleteDatasetVersion. |
v1 |
| description |
string |
The description provided when the version was created. If no description was provided, an empty string is returned. |
The dataset version used for the first evaluation |
| createTime |
string |
The creation time of the version, in RFC 3339 format, including time zone information. For example, the Z in 2026-11-11T06:00:00Z indicates UTC. |
2026-11-11T06:00:00Z |
Examples
Success response
JSON format
{
"requestId": "D17DE39E-6C62-50E3-9EB7-FDE41BB0D43D",
"nextToken": "umaQfI7x758Ns4TgWrj8yA3fYlnk7dJgsfhMrSViRY8=",
"maxResults": 20,
"total": 35,
"versions": [
{
"version": "v1",
"description": "The dataset version used for the first evaluation",
"createTime": "2026-11-11T06:00:00Z"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.