GetDataset

Updated at:

Retrieves a dataset.

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:GetDataset

get

*All Resource

*

None None

Request syntax

GET /api/v1/datasets/{DatasetId} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

DatasetId

string

Yes

The dataset ID. For information on how to obtain a dataset ID, see ListDatasets.

d-rbvg5wz****c9ks92

Request parameters

Parameter

Type

Required

Description

Example

No parameters required.

Response elements

Element

Type

Description

Example

object

The data returned.

RequestId

string

The request ID.

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

DatasetId

string

The dataset ID.

d-rbvg5wz****c9ks92

Name

string

The dataset name.

myName

Description

string

The description of the dataset.

用于标注的数据。

GmtCreateTime

string

The time when the dataset was created.

2021-01-30T12:51:33.028Z

GmtModifiedTime

string

The time when the dataset was last updated.

2021-01-30T12:51:33.028Z

UserId

string

The user ID of the dataset owner.

2485765****023475

OwnerId

string

The owner ID.

1631044****3440

Property

string

The property of the initial dataset version (v1). Valid values:

  • FILE: The dataset is a file.

  • DIRECTORY: The dataset is a folder.

Valid values:

  • DIRECTORY :

    DIRECTORY

  • FILE :

    FILE

DIRECTORY

DataSourceType

string

The data source type. Valid values:

  • OSS: Object Storage Service (OSS).

  • NAS: Apsara File Storage NAS.

Valid values:

  • NAS :

    NAS

  • OSS :

    OSS

NAS

Uri

string

The URI of the initial dataset version (v1). The supported formats are as follows:

  • For an OSS data source: oss://bucket.endpoint/object.

  • For a NAS data source, the format varies by NAS type:

    CPFS 1.0 and CPFS 2.0 are distinguished by the format of the file system ID ():

nas://09f****f2.cn-hangzhou/

Labels

array

The labels attached to the dataset.

Label

A key-value label.

{"Key": "env", "Value": "test"}

DataType

string

The data type of the dataset. Valid values:

  • COMMON: General data

  • PIC: images

  • TEXT: text

  • VIDEO: videos

  • AUDIO: audio

Valid values:

  • VIDEO :

    VIDEO

  • COMMON :

    COMMON

  • TEXT :

    TEXT

  • PIC :

    PIC

  • AUDIO :

    AUDIO

COMMON

SourceType

string

The source type of the initial dataset version (v1).

Valid values:

  • PAI_PUBLIC_DATASET :

    PAI_PUBLIC_DATASET

  • ITAG :

    ITAG

  • USER :

    USER

USER

SourceId

string

The ID of the data source for the initial version (v1). The meaning of this parameter varies based on the SourceType value.

  • If SourceType is USER, you can specify a custom value for SourceId.

  • If SourceType is ITAG, the dataset is generated from an iTAG annotation task, and SourceId is the task ID.

  • If SourceType is PAI_PUBLIC_DATASET, the dataset is created from a PAI public dataset. In this case, SourceId is empty.

jdnhf***fnrimv

WorkspaceId

string

The ID of the workspace where the dataset is located.

478**

Options

string

Extended properties for the initial dataset version (v1), in JSON string format. For example, when using the dataset in a DLC job, you can set the mountPath field to specify the default mount path.

{ "mountPath": "/mnt/data/" }

Accessibility

string

The visibility of the dataset in the workspace. Valid values:

  • PRIVATE: The dataset is visible only to its owner and workspace administrators.

  • PUBLIC: The dataset is visible to all members in the workspace.

  • ROLE_PUBLIC: The dataset is visible to specific workspace roles. For the list of roles, see the AccessibleRoleIdList parameter. The dataset owner and workspace administrators can always view the dataset.

Valid values:

  • PUBLIC :

    PUBLIC

  • PRIVATE :

    PRIVATE

PRIVATE

ProviderType

string

The type of the data source provider. Valid values:

  • ECS (default)

  • Lingjun

Ecs

Provider

string

The provider of the dataset. If the value is pai, the dataset is a PAI public dataset.

pai

SourceDatasetId

string

The ID of the source dataset for the iTAG annotation set.

d-rcdg3wxxxxxhc5jk87

SourceDatasetVersion

string

The version of the source dataset for the annotation set.

v2

TagTemplateType

string

The annotation template of the iTAG annotation set.

TextClassification

LatestVersion DatasetVersion

The latest version of the dataset.

MountAccess

string

The mount permissions for the dataset. Valid values:

  • RO: read-only mount

  • RW: read and write mount

RW

MountAccessReadWriteRoleIdList

array

A list of workspace role IDs granted read/write permissions for the dataset. A role ID that starts with PAI is a basic role ID. A role ID that starts with role- is a custom role ID. If the list contains *, all roles have read and write permissions.

string

A workspace role ID.

PAI.AlgoOperator

ImportInfo

string

The storage import configuration of the dataset. Storage services such as OSS, NAS, and CPFS are supported.

OSS

{
"region": "${region}",// The region ID.
"bucket": "${bucket}",// The bucket name.
"path": "${path}" // The path to the file or folder.
}





NAS

{
"region": "${region}",// The region ID.
"fileSystemId": "${file_system_id}", // The file system ID.
"path": "${path}", // The path in the file system.
"mountTarget": "${mount_target}" // The file system mount target.
}






CPFS

{
"region": "${region}",// The region ID.
"fileSystemId": "${file_system_id}", // The file system ID.
"protocolServiceId":"${protocol_service_id}", // The protocol service ID.
"exportId": "${export_id}", // The export directory ID.
"path": "${path}", // The path in the file system.
}







CPFS for Intelligent Computing

{
"region": "${region}",// The region ID.
"fileSystemId": "${file_system_id}", // The file system ID.
"path": "${path}", // The path in the file system.
"mountTarget": "${mount_target}" // The file system mount target. This parameter is specific to CPFS for Intelligent Computing.
"isVpcMount": boolean, // Specifies whether the mount target is a VPC mount target. Specific to CPFS for Intelligent Computing.
}







{ "region": "cn-wulanchabu", "fileSystemId": "bmcpfs-xxxxxxxxxxx", "path": "/mnt", "mountTarget": "cpfs-xxxxxxxxxxxx-vpc-gacs9f.cn-wulanchabu.cpfs.aliyuncs.com", "isVpcMount": true }

Edition

string

The edition of the dataset. Valid values:

  • BASIC: The basic edition, which does not support file metadata management.

  • ADVANCED: The advanced edition, which is supported only for OSS datasets and allows you to manage metadata for up to 1 million files per version.

BASIC

IsShared

boolean

Indicates whether the dataset is a shared dataset.

Valid values:

  • false :

    false

  • true :

    true

false

SharedFrom DatasetShareRelationship

The source from which the dataset was shared. This parameter is returned only if IsShared is true.

SharingConfig

object

The sharing configuration for the dataset.

SharedTo

array

A list of relationships indicating to whom the dataset is shared.

DatasetShareRelationship

A sharing relationship for the dataset.

AccessibleRoleIdList

array

A list of workspace role IDs that can view the dataset. This parameter takes effect only when Accessibility is set to ROLE_PUBLIC. A role ID that starts with PAI is a basic role ID. A role ID that starts with role- is a custom role ID.

string

A workspace role ID.

PAI.AlgoOperator

Examples

Success response

JSON format

{
  "RequestId": "5A14FA81-DD4E-******-6343FE44B941",
  "DatasetId": "d-rbvg5wz****c9ks92",
  "Name": "myName",
  "Description": "用于标注的数据。",
  "GmtCreateTime": "2021-01-30T12:51:33.028Z",
  "GmtModifiedTime": "2021-01-30T12:51:33.028Z",
  "UserId": "2485765****023475",
  "OwnerId": "1631044****3440",
  "Property": "DIRECTORY",
  "DataSourceType": "NAS",
  "Uri": "nas://09f****f2.cn-hangzhou/",
  "Labels": [
    {
      "Key": "env",
      "Value": "test"
    }
  ],
  "DataType": "COMMON",
  "SourceType": "USER",
  "SourceId": "jdnhf***fnrimv",
  "WorkspaceId": "478**",
  "Options": "{\n  \"mountPath\": \"/mnt/data/\"\n}",
  "Accessibility": "PRIVATE",
  "ProviderType": "Ecs",
  "Provider": "pai",
  "SourceDatasetId": "d-rcdg3wxxxxxhc5jk87\n",
  "SourceDatasetVersion": "v2",
  "TagTemplateType": "TextClassification",
  "LatestVersion": {
    "VersionName": "v1",
    "GmtCreateTime": "2021-01-21T17:12:35.232Z",
    "GmtModifiedTime": "2021-01-21T17:12:35.232Z",
    "Property": "FILE",
    "DataSourceType": "OSS",
    "Uri": "OSS://xxx",
    "Labels": [
      {
        "Key": "env",
        "Value": "test"
      }
    ],
    "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}"
  },
  "MountAccess": "RW",
  "MountAccessReadWriteRoleIdList": [
    "PAI.AlgoOperator"
  ],
  "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}"
      }
    ]
  },
  "AccessibleRoleIdList": [
    "PAI.AlgoOperator"
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.