Queries the details of a file version.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetFileVersion

The operation that you want to perform.

FileId Long Yes 1000001

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

FileVersion Integer Yes 2

The file version whose details you want to query.

RegionId String Yes cn-zhangjiakou

The region ID.

ProjectId Long No 10000

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

ProjectIdentifier String No dw_project

The unique identifier of the DataWorks workspace. You can click the identifier in the upper-left corner of the DataStudio page to switch to another workspace.

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

Response parameters

Parameter Type Example Description
Data Struct

The details of the file version.

ChangeType String UPDATE

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

Comment String Second version

The description of the file version.

CommitTime Long 1593881265000

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.

CommitUser String 7384234****

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

FileContent String SHOW TABLES;

The file code.

FileName String ods_user_info_d

The file name.

FilePropertyContent String null

The basic information about the file.

FileVersion Integer 2

The file version.

IsCurrentProd Boolean true

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

NodeContent String null

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

NodeId Long 3000001

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

Status String COMMITTED

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.

UseType String NORMAL

The functional module to which the file belongs. Valid values: NORMAL, MANUAL, MANUAL_BIZ, SKIP, ADHOCQUERY, and COMPONENT. The value NORMAL indicates DataStudio. The value MANUAL indicates a manually triggered node. The value MANUAL_BIZ indicates a manually triggered workflow. The value SKIP indicates a dry-run DataStudio node. The value ADHOCQUERY indicates an ad hoc query. The value COMPONENT indicates snippets.

ErrorCode String Invalid.Tenant.ConnectionNotExists

The error code returned.

ErrorMessage String The connection does not exist.

The error message returned.

HttpStatusCode Integer 200

The HTTP status code returned.

RequestId String 0000-ABCD-EFG****

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

Success Boolean true

Indicates whether the request is successful.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetFileVersion
&FileId=1000001
&FileVersion=2
&ProjectId=10000
&RegionId=cn-zhangjiakou
&<Common request parameters>

Sample success responses

XML format

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

Error codes

HTTP status code Error code Error message Description
500 InternalError.System An internal system error occurred. Try again later. The error message returned because an internal error has occurred. Try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later. The error message returned because an internal error has occurred. Try again later.
429 Throttling.Api The request for this resource has exceeded your available limit. The error message returned because the number of requests for the resource has exceeded the upper limit.
429 Throttling.System The DataWorks system is busy. Try again later. The error message returned because the DataWorks system is busy. Try again later.
429 Throttling.User Your request is too frequent. Try again later. The error message returned because excessive requests have been submitted within a short period of time. Try again later.
403 Forbidden.Access Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. The error message returned because you are not allowed to perform this operation. Activate DataWorks Enterprise Edition or DataWorks Ultimate Edition.

For a list of error codes, visit the API Error Center.