该接口用于查询指定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. | 用户不在租户中。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。