All Products
Search
Document Center

Platform For AI:ListDatasets

Last Updated:Aug 26, 2026

Retrieves the list of datasets in a specified workspace.

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

paidataset:ListDatasets

list

*All Resource

*

None None

Request syntax

GET /api/v1/datasets HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

PageNumber

integer

No

The page number of the dataset list. Minimum value: 1. Default value: 1.

1

PageSize

integer

No

The number of entries per page settings for paging queries. Default value: 10.

10

Order

string

No

The sorting order for the specified sort field in paging queries. Default value: ASC.

  • ASC: ascending order.

  • DESC: descending order.

Valid values:

  • ASC :

    ASC

  • DESC :

    DESC

ASC

Name

string

No

The dataset name. Fuzzy match is supported based on the dataset name.

myName

Properties

string

No

The dataset properties. Separate multiple values with commas (,). Valid values:

  • DIRECTORY: folder.

  • FILE: file.

Valid values:

  • DIRECTORY :

    DIRECTORY

  • FILE :

    FILE

FILE

DataSourceTypes

string

No

The data source types. Separate multiple values with commas (,). Valid values:

  • NAS: Alibaba Cloud Network Attached Storage (NAS).

  • OSS: Alibaba Cloud Object Storage Service (OSS).

Valid values:

  • NAS :

    NAS

  • OSS :

    OSS

OSS

DataTypes

string

No

The data types of the dataset. Separate multiple values with commas (,). Valid values:

  • VIDEO: video.

  • COMMON: common.

  • TEXT: text.

  • PIC: image.

  • AUDIO: audio.

Valid values:

  • VIDEO :

    VIDEO

  • COMMON :

    COMMON

  • TEXT :

    TEXT

  • PIC :

    PIC

  • AUDIO :

    AUDIO

COMMON,TEXT

SourceId

string

No

The data source ID.

  • If SourceTypes is set to USER, you can customize the SourceId value.

  • If SourceTypes is set to ITAG, which indicates a dataset generated from iTAG annotation results, SourceId is the iTAG task ID.

  • If SourceTypes is set to PAI_PUBLIC_DATASET, which indicates a dataset created from a PAI public dataset, SourceId is empty by default.

d-rbvg5wzljzjhc9ks92

SourceTypes

string

No

The source types. Separate multiple values with commas (,).

Valid values:

  • PAI_PUBLIC_DATASET :

    PAI_PUBLIC_DATASET

  • ITAG :

    ITAG

  • USER :

    USER

USER,ITAG

WorkspaceId

string

No

The ID of the workspace where the dataset resides. For information about how to obtain the workspace ID, see ListWorkspaces. If you do not specify this parameter, the default workspace is used. If the default workspace does not exist, an error is returned.

324**

Label

string

No

The dataset label used to filter the dataset list. Datasets whose label key or value contains the specified string are returned.

test

Provider

string

No

The dataset provider. A value of "pai" indicates that the dataset is a PAI platform public dataset.

pai

SourceDatasetId

string

No

The source dataset ID of the iTAG annotation set.

d-rcdg3wxxxxxhc5jk87

SortBy

string

No

The field by which to sort the results.

Valid values:

  • DataSourceType :

    DataSourceType

  • DataType :

    DataType

  • GmtCreateTime :

    GmtCreateTime

  • GmtModifiedTime :

    GmtModifiedTime

GmtCreateTime

ShareScope

string

No

The sharing filter for datasets:

  • TO_ME: returns only datasets shared with you.

  • BY_ME: returns only datasets you shared with others, with sharing configuration details displayed.

  • If this parameter is not set or is set to empty: returns all datasets in the current workspace, including TO_ME.

Valid values:

  • TO_ME :

    TO_ME

  • BY_ME :

    BY_ME

BY_ME

Edition

string

No

The dataset edition. Valid values:

  • BASIC: Basic Edition. Does not support dataset file metadata management.

  • ADVANCED: Advanced Edition. Supported only for OSS type. Each version supports up to 1 million file metadata entries.

  • LOGICAL: Logical Edition. Supported only for OSS type. Each version supports up to 1 million file metadata entries. Applicable to most scenarios and requires the use of the SDK.

Valid values:

  • LOGICAL :

    LOGICAL

  • BASIC :

    BASIC

  • ADVANCED :

    ADVANCED

BASIC

Accessibility

string

No

The visibility of the dataset.

  • PUBLIC: public.

  • PRIVATE: private.

Valid values:

  • PUBLIC :

    PUBLIC

  • PRIVATE :

    PRIVATE

PRIVATE

DatasetIds

string

No

The dataset IDs. You can specify multiple dataset IDs separated by commas (,).

d-rcdg3wxxxxxhc5jk87

Response elements

Element

Type

Description

Example

object

The response body.

RequestId

string

The request ID.

5A14FA81-DD4E-******-6343FE44B941

Datasets

array

The list of datasets.

Dataset

The dataset.

TotalCount

integer

The total number of entries returned.

15

Examples

Success response

JSON format

{
  "RequestId": "5A14FA81-DD4E-******-6343FE44B941",
  "Datasets": [
    {
      "DatasetId": "d-c0h44g3****j8o4348",
      "UserId": "2485765****023475",
      "OwnerId": "1631044****3440",
      "Name": "myName",
      "DataSourceType": "NAS",
      "Uri": "nas://09f****f2.cn-hangzhou/",
      "GmtCreateTime": "2021-01-21T17:12:35.232Z",
      "GmtModifiedTime": "2021-01-21T17:12:35.232Z",
      "DataType": "COMMON",
      "Property": "DIRECTORY",
      "SourceType": "USER",
      "SourceId": "jdnhf***fnrimv",
      "Description": "This is a description of a dataset.",
      "WorkspaceId": "478**",
      "Options": "{\n  \"mountPath\": \"/mnt/data/\"\n}",
      "Accessibility": "PRIVATE",
      "ProviderType": "Ecs",
      "SourceDatasetId": "d-bvfasdfxxxxj8o411",
      "SourceDatasetVersion": "v2",
      "TagTemplateType": "text-classification",
      "LatestVersion": {
        "VersionName": "v1",
        "GmtCreateTime": "2021-01-21T17:12:35.232Z",
        "GmtModifiedTime": "2021-01-21T17:12:35.232Z",
        "Property": "FILE",
        "DataSourceType": "OSS",
        "Uri": "OSS://xxx",
        "Options": "{\n  \"mountPath\": \"/mnt/data/\"\n}",
        "SourceType": "USER",
        "Description": "base model v1",
        "SourceId": "d-65mrsr5fub4u74lej3",
        "DataCount": 10000,
        "DataSize": 10000,
        "MountAccess": "RO",
        "ImportInfo": "{\n    \"region\": \"cn-wulanchabu\",\n    \"fileSystemId\": \"bmcpfs-xxxxxxxxxxx\",\n    \"path\": \"/mnt\",\n    \"mountTarget\": \"cpfs-xxxxxxxxxxxx-vpc-gacs9f.cn-wulanchabu.cpfs.aliyuncs.com\",\n    \"isVpcMount\": true\n}",
        "DatasetTaskRamRole": "acs:ram::1234567890123456:role/role-name",
        "Labels": [
          {
            "Key": "env",
            "Value": "test"
          }
        ],
        "UserMetricsEndpoints": [
          {
            "Port": 0,
            "Path": ""
          }
        ]
      },
      "MountAccess": "RO RW",
      "ImportInfo": "{\n    \"region\": \"cn-wulanchabu\",\n    \"fileSystemId\": \"bmcpfs-xxxxxxxxxxx\",\n    \"path\": \"/mnt\",\n    \"mountTarget\": \"cpfs-xxxxxxxxxxxx-vpc-gacs9f.cn-wulanchabu.cpfs.aliyuncs.com\",\n    \"isVpcMount\": true\n}",
      "Edition": "BASIC",
      "IsShared": false,
      "SharedFrom": {
        "Status": "ACTIVE",
        "SourceTenantId": "148***************115",
        "SourceWorkspaceId": "33**19",
        "TenantId": "153***************249",
        "WorkspaceId": "42**2",
        "IsSecureMode": true,
        "SharedAt": "2025-08-27T12:23:58Z",
        "ExpiresAt": "2026-08-27T12:23:58Z",
        "AllowedMountAccessLevels": [
          "RO"
        ],
        "Extra": "{\"AllowExportModel\":false,\"AllowAccessDLCWebTerminal\":false,\"AllowAccessDLCFullLog\":false}"
      },
      "SharingConfig": {
        "SharedTo": [
          {
            "Status": "ACTIVE",
            "SourceTenantId": "148***************115",
            "SourceWorkspaceId": "33**19",
            "TenantId": "153***************249",
            "WorkspaceId": "42**2",
            "IsSecureMode": true,
            "SharedAt": "2025-08-27T12:23:58Z",
            "ExpiresAt": "2026-08-27T12:23:58Z",
            "AllowedMountAccessLevels": [
              "RO"
            ],
            "Extra": "{\"AllowExportModel\":false,\"AllowAccessDLCWebTerminal\":false,\"AllowAccessDLCFullLog\":false}"
          }
        ]
      },
      "Labels": [
        {
          "Key": "env",
          "Value": "test"
        }
      ],
      "MountAccessReadWriteRoleIdList": [
        "PAI.AlgoOperator"
      ],
      "AccessibleRoleIdList": [
        "PAI.AlgoOperator"
      ]
    }
  ],
  "TotalCount": 15
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.