全部產品
Search
文件中心

DataWorks:ListFileVersions - 查詢檔案的版本列表

更新時間:Mar 21, 2026

調用ListFileVersions查詢檔案的版本列表。

調試

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

調試

授權資訊

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

請求參數

名稱

類型

必填

描述

樣本值

FileId

integer

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

100000001

ProjectId

integer

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

100001

ProjectIdentifier

string

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

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

dw_project

PageNumber

integer

請求的資料頁數, 用於翻頁。

1

PageSize

integer

每頁顯示的條數,預設為 10 條, 最大 100 條。

10

返回參數

名稱

類型

描述

樣本值

object

返回結果 。

HttpStatusCode

integer

HTTP 狀態代碼 。

200

ErrorMessage

string

錯誤資訊 。

The connection does not exist.

RequestId

string

請求 ID 。

0000-ABCD-EFG****

ErrorCode

string

錯誤碼 。

Invalid.Tenant.ConnectionNotExists

Success

boolean

調用是否成功。取值如下:

  • true:調用成功。

  • false:調用失敗。

true

Data

object

檔案的版本列表 。

PageNumber

integer

當前資料頁的頁碼 。

1

PageSize

integer

當前資料頁的大小 。

10

TotalCount

integer

滿足查詢條件的資料總條數 。

13

FileVersions

array<object>

檔案的版本詳情列表 。

object

檔案的版本詳情 。

FileContent

string

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

SHOW TABLES;

Status

string

檔案版本當前的狀態, 包括 COMMITTING(提交中)、COMMITTED 或 CHECK_OK(已提交)、PACKAGED(準備發布)、DEPLOYING(發布中)、DEPLOYED(發行)和 CANCELLED(解除發佈)。

COMMITTED

IsCurrentProd

boolean

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

  • true:是最新版本。

  • false:不是最新版本。

false

CommitUser

string

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

73842342****

NodeContent

string

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

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

Comment

string

本次檔案版本的說明 。

Second version submission

FilePropertyContent

string

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

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

FileName

string

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

ods_user_info_d

UseType

string

檔案所屬的功能模組, 包括 NORMAL(資料開發)、MANUAL(手動任務)、MANUAL_BIZ(手動工作流程)、SKIP(資料開發的空跑調度)、ADHOCQUERY(臨時查詢)和 COMPONENT(組件管理)。

NORMAL

ChangeType

string

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

UPDATE

FileVersion

integer

檔案的版本 。

2

CommitTime

integer

組建檔案版本的毫秒時間戳記 。

1593881265000

NodeId

integer

組建檔案版本時對應的調度任務 ID 。

1234

樣本

正常返回樣本

JSON格式

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

錯誤碼

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.

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

變更歷史

更多資訊,參考變更詳情