全部產品
Search
文件中心

DataWorks:GetFileVersion - 擷取檔案的版本詳情

更新時間:Mar 21, 2026

調用GetFileVersion擷取檔案的版本詳情。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

當前API暫無授權資訊透出。

請求參數

名稱

類型

必填

描述

樣本值

FileId

integer

檔案的 ID,您可以通過 ListFiles 查詢對應檔案的 ID。

1000001

ProjectId

integer

DataWorks 工作空間的 ID,您可以單擊頁面右上方的小扳手表徵圖,進入工作空間管理頁面查看。

1000011

ProjectIdentifier

string

DataWorks 工作空間的唯一識別碼,即資料開發頁面頂部切換工作空間處的英文標識。

該參數與 ProjectId 參數二者必須設定其一,以確定本次 API 呼叫操作的 DataWorks 工作空間。

dw_project

FileVersion

integer

需要查詢的檔案版本。

2

返回參數

名稱

類型

描述

樣本值

object

返回資料。

HttpStatusCode

integer

HTTP 狀態代碼。

200

ErrorMessage

string

錯誤資訊。

The connection does not exist.

RequestId

string

本次調用的唯一 ID。出現錯誤後,您可以根據該 ID 排查問題。

0000-ABCD-EFG****

ErrorCode

string

錯誤碼。

Invalid.Tenant.ConnectionNotExists

Success

boolean

調用是否成功。

  • true:成功。

  • false:失敗。

true

Data

object

檔案的版本詳情。

FileContent

string

產生本次檔案版本的檔案代碼。

SHOW TABLES;

IsCurrentProd

boolean

本次檔案版本是否為當前生產環境的最新版本。

  • true:是最新版本。

  • false:不是最新版本。

true

Status

string

檔案版本當前的狀態,取值如下:

  • COMMITTING(提交中)

  • COMMITTED 或 CHECK_OK(已提交)

  • PACKAGED(準備發布)

  • DEPLOYING(發布中)

  • DEPLOYED(發行)

  • CANCELLED(解除發佈)

COMMITTED

NodeContent

string

本次檔案版本產生時的調度配置。

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

CommitUser

string

產生本次檔案版本的阿里雲使用者識別碼。

7384234****

Comment

string

本次檔案版本的說明。

Second version submission

FilePropertyContent

string

產生本次檔案版本的檔案基本資料。

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

FileName

string

產生本次檔案版本的檔案名稱。

ods_user_info_d

UseType

string

檔案所屬的功能模組,取值如下:

  • 0:NORMAL(資料開發)

  • 1:MANUAL(手動任務)

  • 2:MANUAL_BIZ(手動工作流程)

  • 3:SKIP(資料開發的空跑調度)

  • 10:ADHOCQUERY(臨時查詢)

  • 30:COMPONENT(組件管理)

0

ChangeType

string

本次檔案版本的變更類型,包括 CREATE、UPDATE 和 DELETE。

UPDATE

FileVersion

integer

檔案的版本。

2

CommitTime

integer

檔案版本產生的毫秒時間戳記。

1593881265000

NodeId

integer

檔案版本產生時對應的調度任務 ID。

3000001

樣本

正常返回樣本

JSON格式

{
  "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
  }
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

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. 沒有許可權,請授權
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.

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情