All Products
Search
Document Center

DataWorks:ListFiles

Last Updated:Jan 12, 2026

Queries a list of files.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
FileFolderPathstringNo

The path to the folder where the file is located.

Business_process/my_first_business_process/MaxCompute/ods_layer
ProjectIdlongNo

The DataWorks workspace ID. You can log on to the DataWorks console and go to the Workspace page to obtain the ID.

You must configure either this parameter or the ProjectIdentifier parameter to determine the DataWorks workspace to which the operation is applied.

10000
KeywordstringNo

The keyword for the file name. Fuzzy match is supported. You can enter a keyword to query all files that contain the keyword.

ods
ProjectIdentifierstringNo

The DataWorks workspace name. To obtain the workspace name, log on to the DataWorks console and navigate to the workspace configuration page.

You must specify either this parameter or ProjectId to identify the target DataWorks workspace for this API call.

dw_project
PageNumberintegerNo

The page number for pagination.

1
PageSizeintegerNo

The number of entries per page. Default value: 10. Maximum value: 100.

10
UseTypestringNo

The functional module to which the file belongs. Valid values:

  • NORMAL: Data Studio
  • MANUAL: Manually triggered node
  • MANUAL_BIZ: Manually triggered workflow
  • SKIP: Dry-run scheduling in Data Studio
  • ADHOCQUERY: Ad hoc query
  • COMPONENT: Component management
NORMAL
FileTypesstringNo

The code type of the file.

The code type of the file. Common code types and their corresponding file types include: 6 (Shell), 10 (ODPS SQL), 11 (ODPS MR), 23 (Data Integration), 24 (ODPS Script), 97 (PAI), 98 (Combined node), 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 sync), 1002 (PAI internal node), 1089 (Cross-tenant node), 1091 (Hologres development), 1093 (Hologres SQL), 1100 (Assignment node), 1106 (ForEach node), 1221 (PyODPS 3).

10,23
OwnerstringNo

The ID of the file owner.

3726346****
NodeIdlongNo

The ID of the scheduling node. You can call the ListNodes operation to obtain the node ID.

123541234
NeedContentbooleanNo

Specifies whether the query result includes the file content. For files with large content, network transmission delays may occur.

false
NeedAbsoluteFolderPathbooleanNo

Specifies whether the query result includes the path to the folder where the file is located.

false
ExactFileNamestringNo

The exact file name. The file name in the query result must exactly match this parameter.

ods_create.sql
FileIdInstringNo

The list of file IDs. The file IDs in the query result must be a subset of this list. You can specify up to 50 file IDs at a time.

78237,816123
LastEditUserstringNo

The Alibaba Cloud account ID of the user who last updated the file.

11233***
CommitStatusintegerNo

The current commit status of the file. Valid values: 0 (the latest code is not committed) and 1 (the latest code is committed).

1

Response parameters

ParameterTypeDescriptionExample
object

The response.

HttpStatusCodeinteger

The HTTP status code.

200
ErrorMessagestring

The error message.

The connection does not exist.
RequestIdstring

The request ID. Use this ID to troubleshoot issues.

0000-ABCD-****
ErrorCodestring

The error code.

Invalid.Tenant.ConnectionNotExists
Successboolean

Indicates whether the call succeeded. Valid values:

  • true
  • false
true
Dataobject

The response details.

PageNumberinteger

The page number.

1
PageSizeinteger

The number of entries per page.

10
TotalCountinteger

The total number of entries returned.

13
Filesarray<object>

The file details.

Fileobject

The file information.

CommitStatusinteger

The current commit status of the file. Valid values: 0 (the latest code is not committed) and 1 (the latest code is committed).

1
AutoParsingboolean

Specifies whether automatic parsing is enabled for the file. Valid values:

  • true: The file automatically parses code.
  • false: The file does not automatically parse code.

This parameter corresponds to Analyze Code when you set Dependencies to Same Cycle in the scheduling configuration of a Data Studio task in the DataWorks console.

true
Ownerstring

The Alibaba Cloud account ID of the file owner.

3872572****
CreateTimelong

The timestamp (in milliseconds) when the file was created.

1593950832000
FileTypeinteger

The file type. Different file types have different code. For more information, see DataWorks node types.

10
CurrentVersioninteger

The latest version of the file.

2
BizIdlong

The ID of the workflow to which the file belongs. This parameter is deprecated. Use the BusinessId parameter instead.

300000
LastEditUserstring

The Alibaba Cloud account ID of the user who last updated the file.

382762****
FileNamestring

The file name.

ods_user_info_d
ConnectionNamestring

The data source name used by the task.

odps_source
UseTypestring

The functional module to which the file belongs. Valid values:

  • NORMAL: Data Studio
  • MANUAL: Manually triggered node
  • MANUAL_BIZ: Manually triggered workflow
  • SKIP: Dry-run scheduling in Data Studio
  • ADHOCQUERY: Ad hoc query
  • COMPONENT: Component management
NORMAL
FileFolderIdstring

The ID of the folder where the file is located.

2735c2****
FileIdlong

The file ID.

10000001
ParentIdlong

If the current file is an internal file of a combined node, this parameter specifies the ID of the corresponding combined node file.

-1
CreateUserstring

The Alibaba Cloud account ID of the file creator.

382762****
IsMaxComputeboolean

If the current file is a MaxCompute resource file, this parameter specifies whether the resource file needs to be uploaded to MaxCompute.

You only need to configure this parameter when the file is a MaxCompute resource file.

false
BusinessIdlong

The ID of the workflow to which the file belongs.

300000
FileDescriptionstring

The description of the file.

my test datastudio file
LastEditTimelong

The timestamp (in milliseconds) when the file was last modified.

1593950832000
Contentstring

This parameter is deprecated. You can call the GetFile operation to query this information.

SHOW TABLES;
NodeIdlong

The ID of the scheduling task generated in the scheduling system after the file is committed.

300001
AbsoluteFolderPathstring

The path to the folder where the file is located.

Business_process/my_first_business_process/MaxCompute/ods_layer

Examples

Sample success responses

JSONformat

{
  "HttpStatusCode": 200,
  "ErrorMessage": "The connection does not exist.",
  "RequestId": "0000-ABCD-****",
  "ErrorCode": "Invalid.Tenant.ConnectionNotExists",
  "Success": true,
  "Data": {
    "PageNumber": 1,
    "PageSize": 10,
    "TotalCount": 13,
    "Files": [
      {
        "CommitStatus": 1,
        "AutoParsing": true,
        "Owner": "3872572****",
        "CreateTime": 1593950832000,
        "FileType": 10,
        "CurrentVersion": 2,
        "BizId": 300000,
        "LastEditUser": "382762****",
        "FileName": "ods_user_info_d",
        "ConnectionName": "odps_source",
        "UseType": "NORMAL",
        "FileFolderId": "2735c2****",
        "FileId": 10000001,
        "ParentId": -1,
        "CreateUser": "382762****",
        "IsMaxCompute": false,
        "BusinessId": 300000,
        "FileDescription": "my test datastudio file",
        "LastEditTime": 1593950832000,
        "Content": "SHOW TABLES;",
        "NodeId": 300001,
        "AbsoluteFolderPath": "Business_process/my_first_business_process/MaxCompute/ods_layer"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
403Forbidden.AccessAccess is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition.No permission, please authorize
429Throttling.ApiThe request for this resource has exceeded your available limit.-
429Throttling.SystemThe DataWorks system is busy. Try again later.-
429Throttling.UserYour request is too frequent. Try again later.-
500InternalError.SystemAn internal system error occurred. Try again later.-
500InternalError.UserId.MissingAn internal system error occurred. Try again later.-

For a list of error codes, visit the Service error codes.