获取某一数据源。
接口说明
方法
GET
URI
/openapi/ha3/instances/{instanceId}/data-sources/{dataSourceName}
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
searchengine:GetDataSource |
get |
*Instance
|
无 | 无 |
请求语法
GET /openapi/ha3/instances/{instanceId}/data-sources/{dataSourceName} HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| instanceId |
string |
否 |
实例 ID |
ha-cn-pl32rf0**** |
| dataSourceName |
string |
否 |
数据源的名称 |
ha-cn-pl32rf0****_test_api |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
当前API无需请求参数
请求示例
GET /openapi/ha3/instances/ha3_instances_id/data-sources/my_data_source
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| requestId |
string |
请求 ID。 |
FE03180A-0E29-5474-8A86-33F0683294A4 |
| result |
object |
数据源信息列表 |
|
| name |
string |
数据源名称 |
ha-cn-pl32rf0****_test_api |
| type |
string |
数据源类型 |
odps |
| domain |
string |
离线部署 |
vpc_hz_domain_1 |
| indexes |
array |
索引列表 |
|
|
string |
索引表 |
index1 |
|
| lastFulTime |
integer |
上一次全量时间 |
1718787219 |
| status |
string |
数据源状态:new: 创建中; publish: 正常; trash: 删除中 |
new |
返回示例
{
"requestId": "0A6EB64B-B4C8-CF02-810F-E660812972FF",
"result": {
"name": "data_source_name",
"type": "odps",
"domain": "test", // 离线部署
"indexes": [
"index1",
"index2"
],
"partitions": [
"ds=2020",
"ds=2021"
],
"lastFulTime": 1628502036000,
"config":{
"accessKey": "xxx",
"accessSecret": "xxxs",
"project":"xxxx",
"table":"xxx",
"partition":"xxxx"
},
"autoBuildIndex": true,
"status": "new" // new: 创建中; publish: 正常; trash: 删除中
}
}
示例
正常返回示例
JSON格式
{
"requestId": "FE03180A-0E29-5474-8A86-33F0683294A4",
"result": {
"name": "ha-cn-pl32rf0****_test_api",
"type": "odps",
"domain": "vpc_hz_domain_1",
"indexes": [
"index1"
],
"lastFulTime": 1718787219,
"status": "new"
}
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。