調用ListFiles查詢檔案清單。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
dataworks:* |
get |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| FileFolderPath |
string |
否 |
檔案所在的檔案夾路徑。 |
Business_process/my_first_business_process/MaxCompute/ods_layer |
| ProjectId |
integer |
否 |
DataWorks 工作空間的 ID。您可以登入 DataWorks 控制台,進入工作空間配置頁面擷取工作空間 ID。 該參數與 ProjectIdentifier 參數,二者必須設定其一,用來確定本次 API 呼叫操作的 DataWorks 工作空間。 |
10000 |
| Keyword |
string |
否 |
檔案名稱的關鍵字。支援模糊比對,即輸入關鍵字即可查詢包含該關鍵字的所有檔案。 |
ods |
| ProjectIdentifier |
string |
否 |
DataWorks 工作空間的名稱。您可以登入 DataWorks 控制台,進入工作空間配置頁面擷取工作空間名稱。 該參數與 ProjectId 參數,二者必須設定其一,用來確定本次 API 呼叫操作的 DataWorks 工作空間。 |
dw_project |
| PageNumber |
integer |
否 |
請求的資料頁數,用於翻頁。 |
1 |
| PageSize |
integer |
否 |
每頁顯示的條數,預設為 10 條,最大為 100 條。 |
10 |
| UseType |
string |
否 |
檔案所屬的功能模組。取值如下:
|
NORMAL |
| FileTypes |
string |
否 |
檔案類型。不同檔案類型其代碼不同,詳情請參見 DataWorks 節點合集。,查詢檔案的代碼類型。 |
10,23 |
| Owner |
string |
否 |
檔案責任人。 |
3726346**** |
| NodeId |
integer |
否 |
調度節點的 ID。您可以調用 ListNodes 介面擷取節點 ID。 |
123541234 |
| NeedContent |
boolean |
否 |
查詢結果是否包含檔案內容(對於內容較多的檔案,可能存在較長的網路傳輸延時)。 |
false |
| NeedAbsoluteFolderPath |
boolean |
否 |
查詢結果是否包含檔案所在的檔案夾的路徑。 |
false |
| ExactFileName |
string |
否 |
精確匹配的檔案名稱,查詢結果的檔案名稱與該參數完全一致。 |
ods_create.sql |
| FileIdIn |
string |
否 |
Fileld 列表,查詢結果的檔案 ID 集合只能是該列表的子集。最多支援一次指定 50 個 FileId。 |
78237,816123 |
| LastEditUser |
string |
否 |
最近一次編輯檔案的使用者阿里雲使用者識別碼。 |
38748246285727 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
返回結果。 |
||
| HttpStatusCode |
integer |
HTTP 狀態代碼。 |
200 |
| ErrorMessage |
string |
錯誤資訊。 |
The connection does not exist. |
| RequestId |
string |
請求 ID。用於出現錯誤後排查問題。 |
0000-ABCD-**** |
| ErrorCode |
string |
錯誤碼。 |
Invalid.Tenant.ConnectionNotExists |
| Success |
boolean |
調用是否成功。取值如下:
|
true |
| Data |
object |
滿足條件的檔案清單。 |
|
| PageNumber |
integer |
請求的資料頁數。 |
1 |
| PageSize |
integer |
每頁顯示的資料條數。 |
10 |
| TotalCount |
integer |
滿足條件的資料總條數。 |
13 |
| Files |
array<object> |
檔案詳情。 |
|
|
object |
檔案資訊。 |
||
| CommitStatus |
integer |
檔案當前的提交狀態,包括 0(未提交最新的代碼)和 1(已提交最新的代碼)。 |
1 |
| AutoParsing |
boolean |
檔案是否開啟自動解析功能。取值如下:
該參數與 DataWorks 控制台中,資料開發工作單位的“調度配置>調度依賴”選擇“同周期”時的“代碼解析”對應。 |
true |
| Owner |
string |
檔案責任人的阿里雲使用者識別碼。 |
3872572**** |
| CreateTime |
integer |
檔案建立時間的毫秒時間戳記。 |
1593950832000 |
| FileType |
integer |
檔案類型。不同檔案類型其代碼不同,詳情請參見 DataWorks 節點合集。 |
10 |
| CurrentVersion |
integer |
檔案當前已經提交的最新版本號碼。 |
2 |
| BizId |
integer |
檔案所屬的商務程序 ID。該欄位已廢棄,請使用 BusinessId 欄位。 |
300000 |
| LastEditUser |
string |
最近一次編輯檔案的使用者阿里雲使用者識別碼。 |
38748246285727 |
| FileName |
string |
檔案的名稱。 |
ods_user_info_d |
| ConnectionName |
string |
檔案對應的任務執行時所使用的資料來源名稱。 |
odps_source |
| UseType |
string |
檔案所屬的功能模組。取值如下:
|
NORMAL |
| FileFolderId |
string |
檔案所在檔案夾的 ID。 |
2735c2**** |
| FileId |
integer |
檔案的 ID。 |
10000001 |
| ParentId |
integer |
如果當前檔案是組合節點檔案的內部檔案,該欄位標識對應組合節點檔案的 ID。 |
-1 |
| CreateUser |
string |
檔案建立者的阿里雲使用者識別碼。 |
382762**** |
| IsMaxCompute |
boolean |
如果當前檔案是 MaxCompute 資源檔,該欄位標識該資源檔是否需要上傳至 MaxCompute。 僅當檔案是 MaxCompute 資源檔時才需要配置該參數。 |
false |
| BusinessId |
integer |
檔案所屬的商務程序 ID。 |
300000 |
| FileDescription |
string |
檔案的描述資訊。 |
my test datastudio file |
| LastEditTime |
integer |
最近一次編輯檔案的毫秒時間戳記。 |
1593950832000 |
| Content |
string |
該參數已廢棄。您可通過 GetFile 介面查詢。 |
SHOW TABLES; |
| NodeId |
integer |
提交檔案後,在調度系統產生的調度任務的 ID。 |
300001 |
| AbsoluteFolderPath |
string |
檔案所在的檔案夾的路徑。 |
Business_process/my_first_business_process/MaxCompute/ods_layer |
樣本
正常返回樣本
JSON格式
{
"HttpStatusCode": 200,
"ErrorMessage": "The connection does not exist.",
"RequestId": "0000-ABCD-****",
"ErrorCode": "Invalid.Tenant.ConnectionNotExists",
"Success": true,
"Data": {
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 13,
"Files": [
{
"CommitStatus": 1,
"AutoParsing": true,
"Owner": "3872572****",
"CreateTime": 1593950832000,
"FileType": 10,
"CurrentVersion": 2,
"BizId": 300000,
"LastEditUser": "38748246285727",
"FileName": "ods_user_info_d",
"ConnectionName": "odps_source",
"UseType": "NORMAL",
"FileFolderId": "2735c2****",
"FileId": 10000001,
"ParentId": -1,
"CreateUser": "382762****",
"IsMaxCompute": false,
"BusinessId": 300000,
"FileDescription": "my test datastudio file",
"LastEditTime": 1593950832000,
"Content": "SHOW TABLES;",
"NodeId": 300001,
"AbsoluteFolderPath": "Business_process/my_first_business_process/MaxCompute/ods_layer"
}
]
}
}
錯誤碼
|
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. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。