All Products
Search
Document Center

DataWorks:ListFileVersions

Last Updated:Jan 12, 2026

Queries a list of file versions.

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
FileIdlongYes

The file ID. You can call ListFiles to query the file ID.

100000001
ProjectIdlongNo

The DataWorks workspace ID. To find this, click the wrench icon in the upper-right corner and navigate to the workspace management page.

100001
ProjectIdentifierstringNo

The unique identifier of the DataWorks workspace, which is the identifier at the top of the Data Studio page where you switch workspaces.

Either this parameter or ProjectId must be specified 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

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.

0000-ABCD-EFG****
ErrorCodestring

The error code.

Invalid.Tenant.ConnectionNotExists
Successboolean

Indicates whether the call succeeded. Valid values:

  • true
  • false
true
Dataobject

The list of file versions.

PageNumberinteger

The current page number.

1
PageSizeinteger

The number of entries on the current page.

10
TotalCountinteger

The total number of entries returned.

13
FileVersionsarray<object>

The list of file version details.

FileVersionobject

The file version details.

FileContentstring

The file code for this version.

SHOW TABLES;
Statusstring

The current status of the file version. Valid values: COMMITTING (committing), COMMITTED or CHECK_OK (committed), PACKAGED (ready for deployment), DEPLOYING (deploying), DEPLOYED (deployed), and CANCELLED (deployment canceled).

COMMITTED
IsCurrentProdboolean

Indicates whether this file version is the latest version in the production environment.

  • true
  • false
false
CommitUserstring

The Alibaba Cloud account ID of the user who created this file version.

73842342****
NodeContentstring

The scheduling configuration for this file version.

{"cycleType":0,"cronExpress":"00 05 00 * * ?"}
Commentstring

The description of this file version.

Second version submission
FilePropertyContentstring

The text information for this file version.

{"fileName":"ods_user_info_d","fileType":10}
FileNamestring

The file name for this file version.

ods_user_info_d
UseTypestring

The functional module to which the file belongs. Valid values: NORMAL (Data Studio), MANUAL (manual task), MANUAL_BIZ (manual workflow), SKIP (dry-run scheduling in Data Studio), ADHOCQUERY (ad hoc query), and COMPONENT (component management).

NORMAL
ChangeTypestring

The change type for this file version. Valid values: CREATE, UPDATE, and DELETE.

UPDATE
FileVersioninteger

The file version.

2
CommitTimelong

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

1593881265000
NodeIdlong

The scheduling task ID associated with this file version.

1234

Examples

Sample success responses

JSONformat

{
  "HttpStatusCode": 200,
  "ErrorMessage": "The connection does not exist.",
  "RequestId": "0000-ABCD-EFG****",
  "ErrorCode": "Invalid.Tenant.ConnectionNotExists",
  "Success": true,
  "Data": {
    "PageNumber": 1,
    "PageSize": 10,
    "TotalCount": 13,
    "FileVersions": [
      {
        "FileContent": "SHOW TABLES;",
        "Status": "COMMITTED",
        "IsCurrentProd": false,
        "CommitUser": "73842342****\n",
        "NodeContent": {
          "cycleType": 0,
          "cronExpress": "00 05 00 * * ?"
        },
        "Comment": "Second version submission",
        "FilePropertyContent": {
          "fileName": "ods_user_info_d",
          "fileType": 10
        },
        "FileName": "ods_user_info_d",
        "UseType": "NORMAL",
        "ChangeType": "UPDATE",
        "FileVersion": 2,
        "CommitTime": 1593881265000,
        "NodeId": 1234
      }
    ]
  }
}

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.