Queries files.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListFiles |
The operation that you want to perform. |
ProjectId | Long | Yes | 10000 |
Dataworks workspace ID and click the workspace manage icon in the upper-right corner to view the workspace information. |
RegionId | String | Yes | cn-zhangjiakou |
The list of regions where the services are located. |
FileFolderPath | String | No | Workflow /my first workflow /MaxCompute/ods |
The path of the folder. |
Keyword | String | No | ods |
The keyword of the file name to facilitate fuzzy matching. |
ProjectIdentifier | String | No | dw_project |
Dataworks unique identifier of the workspace, that is, the name of the workspace at the top of the data Development page. You must specify either this parameter or the ProjectId parameter to determine the Dataworks workspace for the current API call. |
PageNumber | Integer | No | 1 |
The number of data pages that are requested. |
PageSize | Integer | No | 10 |
The number of entries to return on each page. Default value: 10. Maximum value: 100. |
UseType | String | No | 0 |
The functional module to which the file belongs, including NORMAL, MANUAL, MANUAL_BIZ, SKIP, adocquery, and COMPONENT. |
FileTypes | String | No | 10,23 |
The code type of the file. Common code types include 6(Shell), 10(ODPS SQL), 11(ODPS MR), 23 (data integration), 24(ODPS Script), 99 (virtual node), 221(PyODPS 2), 225(ODPS Spark), 227(EMR Hive), 228(EMR Spark), 229(EMR Spark SQL), 230(EMR MR), 239(OSS object inspection), 257(EMR Shell), 258(EMR Spark Shell), 259(EMR Presto), 260(EMR Impala), 900 (real-time synchronization), cross-tenant collaboration node ID: 1089, 1091, 1093,, or 1221, which is PyODPS 3. |
Owner | String | No | 3726346**** |
The person responsible for the document. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Data | Struct |
The list of objects that meet the specified criteria. |
|
Files | Array of File |
The details of the file. |
|
BizId | Long | 300000 |
The workflow ID. to which the object belongs. |
CommitStatus | Integer | 1 |
Indicates the current submission status of the object. Valid values: 0 (the latest code is not submitted) and 1 (the latest code is submitted). |
ConnectionName | String | odps_first |
The ID of the engine instance used for task execution. |
Content | String | SHOW TABLES; |
The code of the file. |
CreateTime | Long | 1593950832000 |
The millisecond timestamp when the object was created. |
CreateUser | String | 382762**** |
The Alibaba Cloud User ID of the document creator. |
CurrentVersion | Integer | 2 |
The latest submitted version number of the file. |
FileDescription | String | my test datastudio file |
Description of the file. |
FileFolderId | String | 2735c2**** |
ID of the folder where the file is located. |
FileId | Long | 10000001 |
The ID of the file. |
FileName | String | ods_user_info_d |
The name of the file. |
FileType | Integer | 10 |
The code type of the file. Common code types include 6(Shell), 10(ODPS SQL), 11(ODPS MR), 23 (data integration), 24(ODPS Script), 99 (virtual node), 221(PyODPS 2), 225(ODPS Spark), 227(EMR Hive), 228(EMR Spark), 229(EMR Spark SQL), 230(EMR MR), 239(OSS object inspection), 257(EMR Shell), 258(EMR Spark Shell), 259(EMR Presto), 260(EMR Impala), 900 (real-time synchronization), cross-tenant collaboration node ID: 1089, 1091, 1093,, or 1221, which is PyODPS 3. |
IsMaxCompute | Boolean | false |
If the current file is a MaxCompute resource file, this field indicates whether the resource file needs to be uploaded to MaxCompute. |
LastEditTime | Long | 1593950832000 |
The millisecond timestamp when the file was last edited. |
LastEditUser | String | 38748246285727 |
The ID of the Alibaba Cloud user who edited the file last time. |
NodeId | Long | 300001 |
The ID of the scheduling task generated in the scheduling system after the file is submitted. |
Owner | String | 3872572**** |
The Alibaba Cloud User ID of the owner of the file. |
ParentId | Long | -1 |
If the current file is an internal file of a composite node file, This field identifies the ID of the corresponding composite node file. |
UseType | String | 0 |
A file type has three functional modules: 0 (data analytics), 1 (one-time task), 2 (one-time workflow), 3 (dry-run scheduling), 10 (ad-hoc query), and 30 (Component Management). |
PageNumber | Integer | 1 |
The number of the requested page. |
PageSize | Integer | 10 |
The size of the requested data page. |
TotalCount | Integer | 13 |
The total number of data records that met the query conditions. |
ErrorCode | String | Invalid.Tenant.ConnectionNotExists |
The error code. |
ErrorMessage | String | The connection does not exist. |
The error message. |
HttpStatusCode | Integer | 200 |
The HTTP status code. |
RequestId | String | 0000-ABCD-EFG |
The unique ID of the call. You can use the error ID to troubleshoot the error. |
Success | Boolean | true |
Indicates whether the request was successful. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=ListFiles &FileFolderPath= workflow /my first workflow /MaxCompute/ods layer&Keyword=ods &ProjectId=10000 &RegionId=cn-zhangjiakou &<common request parameters>
Sample success responses
XML
format
<RequestId>0000-ABCD-EFG</RequestId> <HttpStatusCode>200</HttpStatusCode> <Data> <TotalCount>13</TotalCount> <PageSize>10</PageSize> <PageNumber>1</PageNumber> <Files> <ParentId>-1</ParentId> <Owner>3872572****</Owner> <CreateTime>1593950832000</CreateTime> <FileName>ods_user_info_d</FileName> <UseType>0</UseType> <CurrentVersion>2</CurrentVersion> <CreateUser>382762****</CreateUser> <IsMaxCompute>false</IsMaxCompute> <ConnectionName>odps_first</ConnectionName> <LastEditTime>1593950832000</LastEditTime> <FileDescription>my test datastudio file</FileDescription> <FileType>10</FileType> <Content>SHOW TABLES;</Content> <LastEditUser>387482****</LastEditUser> <NodeId>300001</NodeId> <CommitStatus>1</CommitStatus> <FileFolderId>2735c2****</FileFolderId> <BizId>300000</BizId> </Files> </Data> <ErrorCode>Invalid.Tenant.ConnectionNotExists</ErrorCode> <ErrorMessage>The connection does not exist. </ErrorMessage> <Success>true</Success>
JSON
Format
{ "RequestId": "0000-ABCD-EFG", "HttpStatusCode": 200, "Data": { "TotalCount": 13, "PageSize": 10, "PageNumber": 1, "Files": { "ParentId": -1, "Owner": "3872572****", "CreateTime": 1593950832000, "FileName": "ods_user_info_d", "UseType": 0, "CurrentVersion": 2, "CreateUser": "382762****", "IsMaxCompute": false, "ConnectionName": "odps_first", "LastEditTime": 1593950832000, "FileDescription": "my test datastudio file", "FileType": 10, "Content": "SHOW TABLES;", "LastEditUser": "387482****", "NodeId": 300001, "CommitStatus": 1, "FileFolderId": "2735c2****", "BizId": 300000 } }, "ErrorCode": "Invalid.Tenant.ConnectionNotExists", "ErrorMessage": "The connection does not exist.", "Success": true }
Error codes
HttpCode | Error codes | Error message | Description |
---|---|---|---|
500 | InternalError.System | An internal system error occurred. Try again later. | An internal system error occurred. Please try again later. |
500 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | An internal system error occurred. Please try again later. |
403 | ResourceNotAuthorized.Api | You are not authorized to access the resources. | You cannot access resources without authorization. |
429 | Throttling.Api | The request for this resource has exceeded your available limit. | The request for the resource exceeds your available upper limit. |
429 | Throttling.System | The DataWorks system is busy. Try again later. | DataWorks the system is busy, please try again later. |
429 | Throttling.User | Your request is too frequent. Try again later. | Your request is too frequent, please try to slow down the request speed. |
Go to the Error CenterFor more information, see error codes.