全部产品
Search
文档中心

智能开放搜索 OpenSearch:ListDataSources - 获取数据源列表

更新时间:Aug 27, 2026

获取数据源列表。

接口说明

方法

GET

URI

/openapi/ha3/instances/{instanceId}/data-sources

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

searchengine:ListDataSources

list

*Instance

acs:searchengine:{#regionId}:{#accountId}:instance/{#InstanceId}

无 无

请求语法

GET /openapi/ha3/instances/{instanceId}/data-sources HTTP/1.1

路径参数

名称

类型

必填

描述

示例值

instanceId

string

是

实例 ID

ha-cn-pl32rf0****

请求参数

名称

类型

必填

描述

示例值

当前API无需请求参数

请求示例

GET /openapi/ha3/instances/ha3_instances_id/data-sources

返回参数

名称

类型

描述

示例值

object

requestId

string

请求 ID

93A9E542-8CF8-5BA6-99AB-94C0FE520429

result

array<object>

返回参数

object

数据源信息列表

name

string

数据源名称。

ha-cn-pl32rf0****_test_api

type

string

类型

odps

domain

string

离线部署

vpc_hz_domain_1

indexes

array

索引列表

string

数据源索引。

index1

lastFulTime

integer

上一次全量时间

1718787785

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"
      ],
      "lastFullTime": 1628502036000,
      "config":{
        "accessKey": "xxx",
        "accessSecret": "xxxs",
        "project":"xxxx",
        "table":"xxx",
        "partition":"xxxx"
      },
      "autoBuildIndex": true,
      "status": "new"	   // new: 创建中; publish: 正常; trash: 删除中
    },
    {
      "name": "data_source_name",
      "type": "odps",
      "domain": "test",  // 离线部署      
      "indexes": [
        "index1",
        "index2"
      ],
      "partitions": [
        "ds=2020"
        "ds=2021"
      ],
      "lastFullTime": 1628502036000,
      "config":{
        "accessKey": "xxx",
        "accessSecret": "xxxs",
        "project":"xxxx",
        "table":"xxx",
        "partition":"xxxx"
      },
      "autoBuildIndex": true,
      "status": "new"   // new: 创建中; publish: 正常; trash: 删除中
    }
  ]
}

示例

正常返回示例

JSON格式

{
  "requestId": "93A9E542-8CF8-5BA6-99AB-94C0FE520429",
  "result": [
    {
      "name": "ha-cn-pl32rf0****_test_api",
      "type": "odps",
      "domain": "vpc_hz_domain_1",
      "indexes": [
        "index1"
      ],
      "lastFulTime": 1718787785,
      "status": "new"
    }
  ]
}

错误码

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情。