文档

ListIndexes - 获取索引列表

获取索引列表。

接口说明

方法

GET

URI

/openapi/ha3/instances/{instanceId}/indexes?newMode={newMode}

调试

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

授权信息

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

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
searchengine:ListIndexesList
  • Instance
    acs:searchengine:{#regionId}:{#accountId}:instance/{#InstanceId}

请求语法

GET /openapi/ha3/instances/{instanceId}/indexes

请求参数

名称类型必填描述示例值
instanceIdstring

实例 ID

ha-cn-2r42ostoc01
newModeboolean

是否为新版本控制台页面

true

请求示例



GET /openapi/ha3/instances/ose-test1/indexes

返回参数

名称类型描述示例值
object

Schema of Response

requestIdstring

id of request

4FB0325E-8C37-5525-96AC-0333523170A3
resultobject []

索引列表

namestring

索引名称

general
versionsobject []

版本列表

descstring

描述

close alarm, by 3.9.2 hotfix workflow
filesobject []

文件名列表

fullPathNamestring

全文检索后的目录名

" "
isDirboolean

是否存在目录。

True
isTemplateboolean

是否是模板。

True
namestring

文件名称

ha-cn-7mz2iv7sq01_qrs
namestring

版本名

ha-cn-7pp2ngv4s02_qrs
statusstring

drafting、used、unused (drafting: 草稿, used: 线上使用, unused: 未使用, trash: 删除中)

2
updateTimelong

更新时间

" "
versionIdinteger

版本 id (edit 版本为 null)

1
dataSourcestring

数据源

ha-cn-7mz2kvu2c01_table4
domainstring

数据源的部署名

test
indexStatusstring

NEW, PUBLISH

" "
contentstring

schema JSON

{"summarys":{"parameter":{"file_compressor":"zstd"},"summary_fields":["id"]},"file_compress":[{"name":"file_compressor","type":"zstd"},{"name":"no_compressor","type":""}],"indexs":[{"index_fields":"name","index_name":"ids","index_type":"STRING"},{"has_primary_key_attribute":true,"index_fields":"id","is_primary_key_sorted":false,"index_name":"id","index_type":"PRIMARYKEY64"}],"attributes":[{"file_compress":"no_compressor","field_name":"id"}],"fields":[{"user_defined_param":{},"compress_type":"uniq","field_type":"STRING","field_name":"id"},{"compress_type":"uniq","field_type":"STRING","field_name":"name"}],"table_name":"api"}
partitioninteger

数据分片

2
fullVersionlong

全量版本 即:索引版本

1688523414
fullUpdateTimestring

全量切换时间

2023-07-05 10:40:38
incUpdateTimestring

增量更新时间

2023-07-05 10:58:33
indexSizelong

索引大小

4689
descriptionstring

备注

备注
dataSourceInfoobject

数据源相关信息

processPartitionCountinteger

数据更新资源数

2
namestring

数据源名

index1
typestring

数据源类型 (odps, swift, saro, oss, unKnow)

odps
domainstring

离线部署

test
configobject

odps 数据源配置

endpointstring

odps 相关

http://service.cn-hangzhou.maxcompute.aliyun-inc.com/api
accessKeystring

odps 数据源 ak

root
accessSecretstring

odps 数据源 ak secret

root123
projectstring

odps 数据源项目名称

tisplus_dev
partitionstring

数据分片

ds=12345
tablestring

saro、odps 相关

dump_odps_demo
namespacestring

saro 相关

TEST_dump_demo_sj_na61hunbu2_share_holo
pathstring

hdfs 相关

http://test_opensearch/sift_oss_test.data
ossPathstring

oss 数据源相关

/test_opensearch/sift_oss_test.data
bucketstring

oss 命名空间

ha3test-oss
saroConfigobject

saro 数据源配置

namespacestring

saro 数据源的 namespace

TEST_dump_demo_sj_na61hunbu2_share_holo
tableNamestring

saro 数据表名称

dump_odps_demo
autoBuildIndexboolean

是否开启自动全量

true

返回示例

正确返回 

{

  "requestId": "38b079f1-7846-4226-8c90-3e2644b5c52b",

  "result": [

    {

      "name": "index1",

      "dataSource": "test_yyds_data1",

    },

    {

      "name": "index1",

      "dataSource": "test_yyds_data1",

    }

  ]

}

示例

正常返回示例

JSON格式

{
  "requestId": "4FB0325E-8C37-5525-96AC-0333523170A3",
  "result": [
    {
      "name": "general",
      "versions": [
        {
          "desc": "close alarm, by 3.9.2 hotfix workflow",
          "files": [
            {
              "fullPathName": "\" \"",
              "isDir": true,
              "isTemplate": true,
              "name": "ha-cn-7mz2iv7sq01_qrs"
            }
          ],
          "name": "ha-cn-7pp2ngv4s02_qrs",
          "status": "2",
          "updateTime": 0,
          "versionId": 1
        }
      ],
      "dataSource": "ha-cn-7mz2kvu2c01_table4",
      "domain": "test",
      "indexStatus": "\" \"",
      "content": "{\"summarys\":{\"parameter\":{\"file_compressor\":\"zstd\"},\"summary_fields\":[\"id\"]},\"file_compress\":[{\"name\":\"file_compressor\",\"type\":\"zstd\"},{\"name\":\"no_compressor\",\"type\":\"\"}],\"indexs\":[{\"index_fields\":\"name\",\"index_name\":\"ids\",\"index_type\":\"STRING\"},{\"has_primary_key_attribute\":true,\"index_fields\":\"id\",\"is_primary_key_sorted\":false,\"index_name\":\"id\",\"index_type\":\"PRIMARYKEY64\"}],\"attributes\":[{\"file_compress\":\"no_compressor\",\"field_name\":\"id\"}],\"fields\":[{\"user_defined_param\":{},\"compress_type\":\"uniq\",\"field_type\":\"STRING\",\"field_name\":\"id\"},{\"compress_type\":\"uniq\",\"field_type\":\"STRING\",\"field_name\":\"name\"}],\"table_name\":\"api\"}",
      "partition": 2,
      "fullVersion": 1688523414,
      "fullUpdateTime": "2023-07-05 10:40:38",
      "incUpdateTime": "2023-07-05 10:58:33",
      "indexSize": 4689,
      "description": "备注",
      "dataSourceInfo": {
        "processPartitionCount": 2,
        "name": "index1",
        "type": "odps",
        "domain": "test",
        "config": {
          "endpoint": "http://service.cn-hangzhou.maxcompute.aliyun-inc.com/api",
          "accessKey": "root",
          "accessSecret": "root123",
          "project": "tisplus_dev",
          "partition": "ds=12345",
          "table": "dump_odps_demo",
          "namespace": "TEST_dump_demo_sj_na61hunbu2_share_holo",
          "path": "http://test_opensearch/sift_oss_test.data",
          "ossPath": "/test_opensearch/sift_oss_test.data",
          "bucket": "ha3test-oss"
        },
        "saroConfig": {
          "namespace": "TEST_dump_demo_sj_na61hunbu2_share_holo",
          "tableName": "dump_odps_demo"
        },
        "autoBuildIndex": true
      }
    }
  ]
}

错误码

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

变更历史

变更时间变更内容概要操作
2023-07-20OpenAPI 入参发生变更、OpenAPI 返回结构发生变更看变更集
变更项变更内容
入参OpenAPI 入参发生变更
    新增入参:newMode
出参OpenAPI 返回结构发生变更
2022-01-12新增 OpenAPI看变更集
  • 本页导读 (0)
文档反馈