Queries a list of datasets. Currently, DataWorks datasets and PAI datasets are supported.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| dataworks:ListDatasets | list | *All Resources * |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| ProjectId | long | No | The DataWorks workspace ID. | 251363 |
| Origin | string | No | The dataset source. Valid values:
| DataWorks |
| Name | string | No | The dataset name. Supports fuzzy search. | test_dataset |
| DataTypeList | array | No | The data type. Multiple selections are allowed. Valid values:
| |
| string | No | Data types Valid values:
| COMMON | |
| StorageTypeList | array | No | The storage type. Multiple selections are allowed. Supported values:
| |
| string | No | The storage type. | NAS | |
| CreatorId | string | No | The creator ID. | 12103XXX46492139 |
| SortBy | string | No | The sort field. Default: CreateTime. Valid values:
| CreateTime |
| Order | string | No | The sort order. Default: Desc. Valid values:
| Asc |
| PageNumber | integer | No | The page number. Default: 1. | 1 |
| PageSize | integer | No | The number of entries per page. Default: 10. Maximum: 100. | 10 |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "6A6CBE87-9F91-1323-B680-E7A7065XXXXX\n",
"Success": true,
"PagingInfo": {
"TotalCount": 100,
"PageNumber": 1,
"PageSize": 10,
"Datasets": [
{
"Id": "dataworks-dataset:1gxxxqjx155usz3hrv",
"Name": "test_dataset",
"Comment": "",
"ProjectId": 123456,
"Origin": "DataWorks",
"DataType": "COMMON",
"StorageType": "OSS",
"CreatorId": 210484359,
"Readme": "## introduction",
"LatestVersion": {
"Id": "dataworks-datasetVersion:0gfxxxjx155usz3hrv:1",
"DatasetId": "dataworks-datasetVersion:0gfxxxjx155usz3hrv",
"Comment": "",
"CreatorId": "17815XXX61016173",
"VersionNumber": 1,
"StorageType": "OSS",
"Url": "oss://test-oss-bucket/test_dir/",
"MountPath": "/mnt/data",
"CreateTime": 1736756055000,
"ModifyTime": 1736756055000,
"Labels": [
{
"Key": "key1",
"Value": "value1"
}
],
"ImportInfo": {
"key": "None"
}
},
"CreateTime": 1736756055000,
"ModifyTime": 1736756055000,
"Labels": [
{
"Key": "key1",
"Value": "value1"
}
]
}
]
}
}Error codes
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2025-12-04 | Add Operation | View Change Details |
