Queries a list of file resources in DataStudio. You can also specify filter conditions to query specific file resources.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:* |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectId |
integer |
Yes |
The DataWorks workspace ID. You can log on to the DataWorks console and go to the Workspace page to query the ID. You must configure this parameter to specify the DataWorks workspace to which the API operation is applied. |
10002 |
| Owner |
string |
No |
The ID of the Alibaba Cloud account used by the workspace administrator. You can log on to the Alibaba Cloud Management Console and view the ID on the Security Settings page. |
110755000425XXXX |
| Type |
string |
No |
The resource type. This parameter specifies a filter condition. Valid values:
Valid values:
|
Python |
| Name |
string |
No |
The name of the file resource. Supports fuzzy search. |
test |
| PageNumber |
integer |
No |
The page number of the data to retrieve, used for pagination. |
1 |
| PageSize |
integer |
No |
The page number of the data to retrieve, used for pagination. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
99EBE7CF-69C0-5089-BE3E-79563C31XXXX |
| PagingInfo |
object |
The pagination information. |
|
| TotalCount |
integer |
The total number of entries returned. |
131 |
| PageSize |
integer |
The number of entries per page. |
10 |
| PageNumber |
integer |
The page number. |
1 |
| Resources |
array<object> |
The returned resource list. |
|
|
array<object> |
The elements in the resource list. |
||
| Name |
string |
The resource name. |
math.py |
| ProjectId |
integer |
The ID of the DataWorks workspace. To obtain the workspace ID, log on to the DataWorks console and navigate to the workspace configuration page. |
344247 |
| Owner |
string |
The owner of the file resource. |
110755000425XXXX |
| CreateTime |
integer |
The time when the file resource was created. This value is a UNIX timestamp. |
1724505917000 |
| ModifyTime |
integer |
The timestamp when the file resource was last modified. |
1724505917000 |
| DataSource |
object |
The data source. |
|
| Name |
string |
The name of the data source. |
odps_first |
| Type |
string |
The type of the data source. |
odps |
| Script |
object |
The script information. |
|
| Path |
string |
The script path. |
root/demo |
| Runtime |
object |
Runtime |
|
| Command |
string |
Command. This parameter indicates the file type. |
ODPS_PYTHON |
| Id |
string |
The ID of the script. Note
This field is of type Long in SDK versions prior to 8.0.0, and of type String in SDK version 8.0.0 and later. This change does not affect the normal use of the SDK. The parameter is returned based on the type defined in the SDK. Compilation failures caused by the type change may occur only when you upgrade the SDK across version 8.0.0. In this case, you must manually update the data type. |
123348864897630XXXX |
| Type |
string |
The resource type. Valid values:
Valid values:
|
Jar |
| SourceType |
string |
The source storage type of the file resource. Valid values:
Valid values:
|
Local |
| SourcePath |
string |
Source path of the file resource. This parameter is empty if the type is Local. |
XXX/unknown/ide/1/XXX/20240820200851_963a9da676de44ef8d06a6576a8c4d6a.py |
| TargetType |
string |
The destination storage type. Valid values:
Valid values:
|
Oss |
| TargetPath |
string |
The destination storage path. |
XXX/unknown/ide/1/XXX/20240820200851_963a9da676de44ef8d06a6576a8c4d6a.py |
| Id |
string |
The unique identifier of the file resource. Note
Prior to SDK version 8.0.0, this field is of type Long. In SDK version 8.0.0 and later, it is of type String. This change does not affect the normal use of the SDK. The parameter is returned based on the type defined in the SDK. Compilation failures caused by the type change may occur only when you upgrade the SDK across version 8.0.0. In this case, you must manually update the data type. |
631478864897630XXXX |
Examples
Success response
JSON format
{
"RequestId": "99EBE7CF-69C0-5089-BE3E-79563C31XXXX",
"PagingInfo": {
"TotalCount": 131,
"PageSize": 10,
"PageNumber": 1,
"Resources": [
{
"Name": "math.py",
"ProjectId": 344247,
"Owner": "110755000425XXXX",
"CreateTime": 1724505917000,
"ModifyTime": 1724505917000,
"DataSource": {
"Name": "odps_first",
"Type": "odps"
},
"Script": {
"Path": "root/demo",
"Runtime": {
"Command": "ODPS_PYTHON"
},
"Id": "123348864897630XXXX"
},
"Type": "Jar",
"SourceType": "Local",
"SourcePath": "XXX/unknown/ide/1/XXX/20240820200851_963a9da676de44ef8d06a6576a8c4d6a.py",
"TargetType": "Oss",
"TargetPath": "XXX/unknown/ide/1/XXX/20240820200851_963a9da676de44ef8d06a6576a8c4d6a.py",
"Id": "631478864897630XXXX"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.