ListDatasetVersions

Updated at:

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

agentloop:ListDatasetVersions

list

*Dataset

acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpace}/dataset/{#DatasetName}

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.