Mengkueri daftar versi file.
Coba sekarang
Test
RAM authorization
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| FileId |
integer |
Yes |
ID file. Anda dapat memanggil ListFiles untuk mengkueri ID file. |
100000001 |
| ProjectId |
integer |
No |
ID ruang kerja DataWorks. Anda dapat mengklik ikon kunci pas kecil di pojok kanan atas halaman untuk menuju ke halaman manajemen penyimpanan dan melihat ID-nya di Tampilan. |
100001 |
| ProjectIdentifier |
string |
No |
Pengidentifikasi unik ruang kerja DataWorks, yaitu pengidentifikasi bahasa Inggris yang ditampilkan dalam pengalih ruang kerja di bagian atas halaman DataStudio. Anda harus mengatur parameter ini atau ProjectId untuk menentukan ruang kerja DataWorks untuk panggilan API ini. |
dw_project |
| PageNumber |
integer |
No |
Nomor halaman. Digunakan untuk paginasi. |
1 |
| PageSize |
integer |
No |
Jumlah entri per halaman. Nilai default: 10. Nilai maksimum: 100. |
10 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Parameter tanggapan. |
||
| HttpStatusCode |
integer |
Kode status HTTP. |
200 |
| ErrorMessage |
string |
Paket kesalahan. |
The connection does not exist |
| RequestId |
string |
ID permintaan. |
0000-ABCD-EFG**** |
| ErrorCode |
string |
Kode kesalahan. |
Invalid.Tenant.ConnectionNotExists |
| Success |
boolean |
Apakah panggilan berhasil. Nilai valid:
|
true |
| Data |
object |
Daftar versi file. |
|
| PageNumber |
integer |
Nomor halaman saat ini. |
1 |
| PageSize |
integer |
Ukuran halaman saat ini. |
10 |
| TotalCount |
integer |
Jumlah total entri yang memenuhi kondisi kueri. |
13 |
| FileVersions |
array<object> |
Daftar detail versi file. |
|
|
object |
Detail versi file. |
||
| FileContent |
string |
The code of the file in the file version. |
SHOW TABLES; |
| Status |
string |
The status of the file version. Valid values: COMMITTING (being committed), COMMITTED or CHECK_OK (committed), PACKAGED (packaged for deployment), DEPLOYING (being deployed), DEPLOYED (deployed), and CANCELLED (deployment canceled). |
COMMITTED |
| IsCurrentProd |
boolean |
Indicates whether the file version is the latest version that is deployed to the production environment.
|
false |
| CommitUser |
string |
The ID of the Alibaba Cloud account that is used to create the file version. |
73842342**** |
| NodeContent |
string |
The scheduling configuration of the file version. |
{"cycleType":0,"cronExpress":"00 05 00 * * ?"} |
| Comment |
string |
The description of the file version. |
Second version submission |
| FilePropertyContent |
string |
The basic information of the file in the file version. |
{"fileName":"ods_user_info_d","fileType":10} |
| FileName |
string |
The name of the file in the file version. |
ods_user_info_d |
| UseType |
string |
The functional module to which the file belongs. Valid values: NORMAL (DataStudio), MANUAL (manually triggered node), MANUAL_BIZ (manually triggered workflow), SKIP (dry-run node in DataStudio), ADHOCQUERY (ad hoc query), and COMPONENT (component management). |
NORMAL |
| 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 file version was created. The value is a UNIX timestamp in milliseconds. |
1593881265000 |
| NodeId |
integer |
The ID of the scheduling node that is associated with the file 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****\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
}
]
}
}
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.