ListResources
Lists resource files with pagination and optional filters.
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 ID of the DataWorks workspace. You can log on to the DataWorks console and go to the Workspace Management page to obtain the workspace ID. This parameter specifies the DataWorks workspace for the API operation. |
10002 |
| Owner |
string |
No |
The ID of the owner, which is the UID of the workspace administrator account. You can log on to the Alibaba Cloud Management Console and view the account UID in the Security Settings section of the Account Center. |
110755000425XXXX |
| Type |
string |
No |
The resource type used as a filter condition. Valid values:
Valid values:
|
Python |
| Name |
string |
No |
The name of the file resource. Fuzzy search is supported. |
test |
| PageNumber |
integer |
No |
The page number of the requested data. |
1 |
| PageSize |
integer |
No |
The number of entries per page. Default value: 10. Maximum value: 100. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The unique ID of the request. You can use the ID to troubleshoot issues if an error occurs. |
99EBE7CF-69C0-5089-BE3E-79563C31XXXX |
| PagingInfo |
object |
The pagination information. |
|
| TotalCount |
integer |
The total number of entries that meet the conditions. |
131 |
| PageSize |
integer |
The number of entries per page. |
10 |
| PageNumber |
integer |
The page number of the requested data. |
1 |
| Resources |
array<object> |
The list of resources returned by the query. |
|
|
array<object> |
A file resource in the list. |
||
| Name |
string |
The name of the resource. |
math.py |
| ProjectId |
integer |
The ID of the DataWorks workspace. You can log on to the DataWorks console and go to the Workspace Management page to obtain the workspace ID. |
344247 |
| Owner |
string |
The owner of the file resource. |
110755000425XXXX |
| CreateTime |
integer |
The timestamp when the file resource was created. |
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 path of the script. |
root/demo |
| Runtime |
object |
The runtime. |
|
| Command |
string |
The command, which indicates the file type. |
ODPS_PYTHON |
| Id |
string |
The ID of the script. Important The data type of this field is Long in SDK versions earlier than 8.0.0, and String in SDK 8.0.0 and later. This change does not affect the normal use of the SDK. The SDK returns this field in the type defined by that version. However, if you upgrade the SDK across version 8.0.0, the data type change may cause project compilation failures. In this case, you must manually correct the data type. |
123348864897630XXXX |
| Type |
string |
The type of the resource. Valid values:
Valid values:
|
jar |
| SourceType |
string |
The source storage type of the file resource. Valid values:
Valid values:
|
local |
| SourcePath |
string |
The source path of the file resource. This parameter is empty when the type is local. |
XXX/unknown/ide/1/XXX/20240820200851_963a9da676de44ef8d06a6576a8c4d6a.py |
| TargetType |
string |
The target file storage type. Valid values:
Valid values:
|
oss |
| TargetPath |
string |
The target storage path of the file resource. |
XXX/unknown/ide/1/XXX/20240820200851_963a9da676de44ef8d06a6576a8c4d6a.py |
| Id |
string |
The unique identifier of the file resource. Important The data type of this field is Long in SDK versions earlier than 8.0.0, and String in SDK 8.0.0 and later. This change does not affect the normal use of the SDK. The SDK returns this field in the type defined by that version. However, if you upgrade the SDK across version 8.0.0, the data type change may cause project compilation failures. In this case, you must manually correct 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.