該介面用於查詢指定DataWorks工作空間的資料開發中繫結資料源列表。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
dataworks:* |
get |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| ProjectId |
integer |
是 |
資料來源所屬的 DataWorks 工作空間。 |
466230 |
| Name |
string |
否 |
查詢的資料來源名稱,精確匹配。 |
test_mc |
| CalcEngineType |
string |
是 |
查詢的資料來源類型。目前範圍如下,不區分大小寫。
|
ODPS |
| EnvType |
string |
否 |
資料來源所屬的環境。
|
PRD |
| PageSize |
integer |
否 |
分頁查詢時每頁顯示的資料量,預設為 10 條,最大 100 條。 |
10 |
| PageNumber |
integer |
否 |
分頁查詢的頁碼。大於等於 1 的正整數,預設為 1。 |
1 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
返回結果。 |
||
| HttpStatusCode |
integer |
請求返回碼。 |
200 |
| RequestId |
string |
請求 ID。 |
1AFAE64E-D1BE-432B-A9**** |
| Success |
boolean |
請求是否成功,取值如下:
|
true |
| Data |
object |
分頁查詢結果。 |
|
| PageNumber |
integer |
頁碼。 |
1 |
| PageSize |
integer |
每頁顯示的條數。 |
20 |
| TotalCount |
integer |
資料來源的總數。 |
1 |
| CalcEngines |
array<object> |
資料來源列表。 |
|
|
array<object> |
資料來源資訊。 |
||
| BindingProjectName |
string |
資料來源關聯的工作空間名稱。 |
test_project |
| IsDefault |
boolean |
是否為當前類型的預設資料來源。 |
true |
| EngineId |
integer |
資料來源 ID。 |
35 |
| DwRegion |
string |
資料來源關聯的 DataWorks 工作空間所在的地區。 |
cn-zhangjiakou |
| TaskAuthType |
string |
資料來源的訪問身份。
|
PROJECT |
| CalcEngineType |
string |
資料來源類型。 |
ODPS |
| EngineInfo |
object |
資料來源的詳細資料。
|
{ "pubEndpoint": "service.cn.maxcompute.aliyun.com/api", "endpoint": "service.cn.maxcompute.aliyun-inc.com/api", "initProperties": " {\"odpsTypeMode\":\"STANDARD\",\"openPai\":false,\"openPaiGpu\":false}", "resourceGroupType": "ODPS", "resourceGroupId": "361826516****", "vpcEndpoint": "service.cn.maxcompute.aliyun-inc.com/api", "projectName": "onefall_test_zjk", "taskSameAsOwner": "true" } |
| EnvType |
string |
資料來源所在的環境。
|
PRD |
| Region |
string |
資料來源所在的地區。 |
cn-zhangjiakou |
| GmtCreate |
string |
資料來源的建立時間。 |
Oct 10, 2019 3:42:44 PM |
| BindingProjectId |
integer |
資料來源所在的工作空間 ID。 |
466230 |
| Name |
string |
資料來源的顯示名稱。 |
test_mc |
| TenantId |
integer |
租戶 ID。 |
1234567 |
樣本
正常返回樣本
JSON格式
{
"HttpStatusCode": 200,
"RequestId": "1AFAE64E-D1BE-432B-A9****",
"Success": true,
"Data": {
"PageNumber": 1,
"PageSize": 20,
"TotalCount": 1,
"CalcEngines": [
{
"BindingProjectName": "test_project",
"IsDefault": true,
"EngineId": 35,
"DwRegion": "cn-zhangjiakou",
"TaskAuthType": "PROJECT",
"CalcEngineType": "ODPS",
"EngineInfo": {
"pubEndpoint": "service.cn.maxcompute.aliyun.com/api",
"endpoint": "service.cn.maxcompute.aliyun-inc.com/api",
"initProperties": " {\"odpsTypeMode\":\"STANDARD\",\"openPai\":false,\"openPaiGpu\":false}",
"resourceGroupType": "ODPS",
"resourceGroupId": "361826516****",
"vpcEndpoint": "service.cn.maxcompute.aliyun-inc.com/api",
"projectName": "onefall_test_zjk",
"taskSameAsOwner": "true"
},
"EnvType": "PRD",
"Region": "cn-zhangjiakou",
"GmtCreate": "Oct 10, 2019 3:42:44 PM",
"BindingProjectId": 466230,
"Name": "test_mc",
"TenantId": 1234567
}
]
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | Invalid.Tenant.ConnectionNotExists | The connection does not exist. | 資料來源不存在。 |
| 400 | Invalid.Tenant.ProjectNotExists | The project does not exist. | 專案不存在。 |
| 400 | Invalid.Tenant.UserNotInProject | The user is not in the project. | 使用者不在專案中。 |
| 400 | Invalid.CalcEngineEnvType | The specified envType %s is invalid. | 傳入的引擎環境類型非法 |
| 400 | Invalid.CalcEngineType | The specified calcEngineType %s is invalid. | 傳入的引擎類型非法 |
| 403 | Invalid.Tenant.UserIsNotProjectOwnerOrAdmin | The user is not a project administrator or owner. | 使用者不是專案負責人或者專案系統管理員。 |
| 403 | Invalid.Tenant.UserNotInTenant | The user is not in tenant. | 使用者不在租戶中。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。