GetFileVersion

Updated at:

Queries the information about a file version.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

FileId

integer

Yes

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

1000001

ProjectId

integer

No

The DataWorks workspace ID. You can click the Workspace Manage icon in the upper-right corner of the Data Studio page to go to the workspace management page and view the workspace ID.

1000011

ProjectIdentifier

string

No

The unique English identifier of the DataWorks workspace, displayed in the workspace switcher at the top of the Data Studio page.

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

dw_project

FileVersion

integer

Yes

The file version whose details you want to query.

2

Response elements

Element

Type

Description

Example

object

The returned data.

HttpStatusCode

integer

The HTTP status code returned.

200

ErrorMessage

string

The error message returned.

The connection does not exist.

RequestId

string

The ID of the request. You can troubleshoot issues based on the ID.

0000-ABCD-EFG****

ErrorCode

string

The error code returned.

Invalid.Tenant.ConnectionNotExists

Success

boolean

Indicates whether the request is successful. Valid values: true (successful) and false (failed).

true

Data

object

The details of the file version.

FileContent

string

The file code.

SHOW TABLES;

IsCurrentProd

boolean

Indicates whether this file version is the latest version in the production environment. Valid values: true (latest) and false (not latest).

true

Status

string

The status of the file version. Valid values: COMMITTING, COMMITTED, CHECK_OK, PACKAGED, DEPLOYING, DEPLOYED, and CANCELLED. The value CHECK_OK is equivalent to the value COMMITTED.

COMMITTED

NodeContent

string

The scheduling configurations of the node that corresponds to the file version.

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

CommitUser

string

The ID of the Alibaba Cloud account that is used to create the file version.

7384234****

Comment

string

The description of the file version.

Second version submission

FilePropertyContent

string

The basic information about the file.

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

FileName

string

The file name.

ods_user_info_d

UseType

string

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

  • 0: NORMAL (Data Studio).

  • 1: MANUAL (manually triggered tasks).

  • 2: MANUAL_BIZ (manually triggered workflows).

  • 3: SKIP (dry-run scheduling in Data Studio).

  • 10: ADHOCQUERY (ad hoc queries).

  • 30: COMPONENT (component management).

0

ChangeType

string

The change type of the file version. Valid values: CREATE, UPDATE, and DELETE.

UPDATE

FileVersion

integer

The file version.

2

CommitTime

integer

The time when the version was generated. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1593881265000

NodeId

integer

The ID of the node that corresponds to the file version.

3000001

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

500 InternalError.System An internal system error occurred. Try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later.
403 Forbidden.Access Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. No permission, please authorize
429 Throttling.Api The request for this resource has exceeded your available limit.
429 Throttling.System The DataWorks system is busy. Try again later.
429 Throttling.User Your request is too frequent. Try again later.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.