All Products
Search
Document Center

DataWorks:ListFileVersions

Last Updated:Jun 11, 2026

Meminta daftar versi file.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

dataworks:*

get

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

FileId

integer

Yes

ID file. Anda dapat memanggil operasi ListFiles untuk meminta ID.

100000001

ProjectId

integer

No

ID workspace DataWorks. Anda dapat mengeklik ikon Workspace Manage di sudut kanan atas halaman DataStudio untuk membuka halaman Workspace dan melihat ID workspace.

100001

ProjectIdentifier

string

No

Pengenal unik workspace DataWorks. Anda dapat mengeklik pengenal tersebut di sudut kiri atas halaman DataStudio untuk beralih ke workspace lain.

Anda harus menentukan parameter ini atau ProjectId untuk menentukan workspace DataWorks tempat operasi diterapkan.

dw_project

PageNumber

integer

No

Nomor halaman.

1

PageSize

integer

No

Jumlah entri per halaman. Nilai default: 10. Nilai maksimum: 100.

10

Elemen respons

Element

Type

Description

Example

object

HttpStatusCode

integer

Kode status HTTP yang dikembalikan.

200

ErrorMessage

string

Pesan kesalahan yang dikembalikan.

The connection does not exist.

RequestId

string

ID permintaan.

0000-ABCD-EFG****

ErrorCode

string

Kode kesalahan yang dikembalikan.

Invalid.Tenant.ConnectionNotExists

Success

boolean

Menunjukkan apakah permintaan berhasil.

true

Data

object

Versi file.

PageNumber

integer

Nomor halaman dari halaman yang dikembalikan.

1

PageSize

integer

Jumlah entri yang dikembalikan per halaman.

10

TotalCount

integer

Total jumlah entri yang dikembalikan.

13

FileVersions

array<object>

Detail versi file.

object

FileContent

string

The code in the file of the current version.

SHOW TABLES;

Status

string

The status of the file of the current version. Valid values: COMMITTING, COMMITTED, CHECK_OK, PACKAGED, DEPLOYING, DEPLOYED, and CANCELLED.

COMMITTED

IsCurrentProd

boolean

Indicates whether the file version is the same as the latest file version in the production environment.

false

CommitUser

string

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

73842342****

NodeContent

string

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

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

Comment

string

The description of the file version.

Second version submission

FilePropertyContent

string

The basic information about the file of the current version.

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

FileName

string

The name of the file of the current version.

ods_user_info_d

UseType

string

The functional module to which the file belongs. Valid values: NORMAL, MANUAL, MANUAL_BIZ, SKIP, ADHOCQUERY, and COMPONENT. The value SKIP indicates that the node corresponding to the file is run in dry-run mode.

NORMAL

ChangeType

string

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

UPDATE

FileVersion

integer

The version of the file.

2

CommitTime

integer

The time when the file version was created. 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 auto triggered node that corresponds to the file of the current version.

1234

Contoh

Respons sukses

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****",
        "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
      }
    ]
  }
}

Kode kesalahan

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.
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.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.