All Products
Search
Document Center

OpenSearch:ListIndexes

Last Updated:Jul 16, 2024

Obtains the index list.

Operation description

Method

GET

URI

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

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

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

Request parameters

ParameterTypeRequiredDescriptionExample
instanceIdstringYes

The instance ID.

ha-cn-2r42ostoc01
newModebooleanNo

Specifies whether the OpenSearch Vector Search Edition instance is of the new version.

true

Sample requests



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

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

requestIdstring

The request ID.

4FB0325E-8C37-5525-96AC-0333523170A3
resultarray<object>

The details of indexes.

object

The list of index details.

namestring

The index name.

general
versionsarray<object>

The index versions.

object

The version of the index.

descstring

The description of the index version.

close alarm, by 3.9.2 hotfix workflow
filesarray<object>

The files.

object

The version information.

fullPathNamestring

The full path of the file.

" "
isDirboolean

Indicates whether the file is a directory.

True
isTemplateboolean

Indicates whether the file is a template.

True
namestring

The file name.

ha-cn-7mz2iv7sq01_qrs
namestring

The name of the index version.

ha-cn-7pp2ngv4s02_qrs
statusstring

The status of the index version. Valid values:

  • NEW: The index version is created.
  • PUBLISH: The index version is normal.
  • IN_USE: The index version is in use.
  • NOT_USE: The index version is not used.
  • STOP_USE: The index version is being stopped.
  • RESTORE_USE: The index version is being restored.
  • FAIL: The index version failed to be created.
2
updateTimelong

The time when the index version was updated.

" "
versionIdinteger

The ID of the index version. If the index version is modified, the returned value is null.

1
dataSourcestring

The name of the data source.

ha-cn-7mz2kvu2c01_table4
domainstring

The deployment name of the index.

test
indexStatusstring

The index ststus. Valid values: NEW and PUBLISH.

" "
contentstring

The index schema, which is a JSON string.

{"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

The number of shards.

2
fullVersionlong

The full version of the index.

1688523414
fullUpdateTimestring

The time when full data in the index was last updated.

2023-07-05 10:40:38
incUpdateTimestring

The time when incremental data in the index was last updated.

2023-07-05 10:58:33
indexSizelong

The index size.

4689
descriptionstring

The description.

Description
dataSourceInfoobject

The information about the data source.

processPartitionCountinteger

The number of resources used for data update.

2
namestring

The name of the data source.

index1
typestring

The type of the data source. Valid values: odps, swift, saro, oss, and unKnow.

odps
domainstring

The data center in which the data source is deployed.

test
configobject

The configuration of MaxCompute data sources.

endpointstring

The endpoint of the MaxCompute data source.

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

The AccessKey ID of the MaxCompute data source.

root
accessSecretstring

The AccessKey secret of the MaxCompute data source.

root123
projectstring

The name of the MaxCompute project that is used as the data source.

tisplus_dev
partitionstring

The shard name.

ds=12345
tablestring

The name of the MaxCompute table that is used as the data source.

dump_odps_demo
namespacestring

The namespace. This parameter is applicable to the SARO data source used in the intranet of Alibaba Group.

TEST_dump_demo_sj_na61hunbu2_share_holo
pathstring

The file path in the Apsara File Storage for HDFS file system.

http://test_opensearch/sift_oss_test.data
ossPathstring

The Object Storage Service (OSS) path.

/test_opensearch/sift_oss_test.data
bucketstring

The OSS bucket.

ha3test-oss
saroConfigobject

The configurations of the SARO data source.

namespacestring

The namespace of the SARO data source.

TEST_dump_demo_sj_na61hunbu2_share_holo
tableNamestring

The name of the SARO table.

dump_odps_demo
autoBuildIndexboolean

Indicates whether the automatic full indexing feature is enabled.

true

Sample responses

Success responses 

{

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

  "result": [

    {

      "name": "index1",

      "dataSource": "test_yyds_data1",

    },

    {

      "name": "index1",

      "dataSource": "test_yyds_data1",

    }

  ]

}

Examples

Sample success responses

JSONformat

{
  "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": "Description\n",
      "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
      }
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-07-20The request parameters of the API has changed. The response structure of the API has changedView Change Details
2022-01-12Add OperationView Change Details