Queries the indexes stored on an Elasticsearch cluster.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only common request headers. For more information, see Common request headers.

Request syntax

GET /openapi/instances/{InstanceId}/indices HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
InstanceId String Path Yes es-cn-tl329rbpc0001****

The ID of the instance.

all Boolean Query No false

Specifies whether to obtain all indexes. Valid values:

  • true: returns a list of indexes including system indexes.
  • false (default): returns a list of indexes other than the system index.
name String Query No log-0001

The name of the index. Fuzzy match is supported.

isManaged Boolean Query No false

Specifies whether to view only the indexes in the host. Valid values:

  • true: only the indexes in the host are viewed.
  • false: displays all indexes. This is the default value.
isOpenstore Boolean Query No false

Specifies whether to view only the OpenStore cold stage index. Valid values:

  • true: View only OpenStore cold-stage indexes.
  • false: displays all indexes. This is the default value.
page Integer Query No 1

The page number of the returned page. Pages start from page 1. Default value: 1.

size Integer Query No 15

The number of entries to return on each page. Maximum value: 100. Default value: 20.

Response parameters

Parameter Type Example Description
RequestId String F99407AB-2FA9-489E-A259-40CF6DCC****

The ID of the request.

Headers Object

The header of the response.

X-Managed-StorageSize Long 18093942932

The total size of the index in Cloud Hosting. Unit: bytes.

X-Managed-Count Integer 15

The total number of indexes in Cloud Hosting.

X-OSS-StorageSize Long 9093942932

The total size of the OpenStore cold stage index for this instance. Unit: bytes.

X-OSS-Count Integer 5

The total number of indexes in the OpenStore cold phase.

Result Array of Result

The details of the index list.

isManaged String false

This parameter is deprecated.

createTime String 2021-01-11T05:49:41.114Z

The time when the index list was queried.

size Long 49298589

The total storage space occupied by the current index. Unit: bytes.

managedStatus String closing

The managed status of the index. The following three statuses are supported:

  • following: Hosting.
  • closing: The instance is being unhosted.
  • closed: unmanaged.
name String .kibana_task_manager_1

The name of the Elasticsearch index.

health String green

The running status of the index. The following three statuses are supported:

  • green: healthy.
  • yellow: alerts.
  • red: an exception.
phase String warm

The current storage lifecycle. Value meaning:

  • warm: warm.
  • cold: the cold phase.
  • hot: hot phase.
  • delete: deletes a stage.
Note If this parameter is empty, the current index is not managed by the lifecycle.
ilmExplain String { "indices": { ".ds-console-2021.08.18-000002": { "index": ".ds-console-2021.08.18-000002", "managed": true, "policy": "console", "lifecycle_date_millis": 1629277498775, "age": "2.64h", "phase": "hot", "phase_time_millis": 1629277450334, "action": "complete", "action_time_millis": 1629278605586, "step": "complete", "step_time_millis": 1629278605586, "phase_execution": { "policy": "console", "phase_definition": { "min_age": "0s", "actions": { "rollover": { "max_size": "1gb", "max_age": "1d", "max_docs": 10000 }, "set_priority": { "priority": 1000 } } }, "version": 1, "modified_date_in_millis": 1629277370953 } } } }

The full lifecycle status of the current index.

Examples

Sample requests

GET /openapi/instances/es-cn-tl329rbpc0001****/indices?all=false&name=log-0001&isManaged=false&isOpenstore=false&page=1&size=15 HTTP/1.1
Host:elasticsearch.aliyuncs.com
Content-Type:application/json

Sample responses

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "F99407AB-2FA9-489E-A259-40CF6DCC****",
  "Result" : [ {
    "name" : ".kibana_task_manager_1",
    "health" : "green",
    "size" : 4929858933232,
    "createTime" : "2021-01-11T05:49:41.114Z",
    "managedStatus" : "closing",
    "ilmExplain" : "{\n    \"indices\": {\n        \".kibana_task_manager_1\": {\n            \"index\": \".kibana_task_manager_1\",\n            \"managed\": false\n        }\n    }\n}"
  }, {
    "name" : ".ds-console-2021.08.18-000002",
    "health" : "yellow",
    "size" : 49298589,
    "createTime" : "2021-01-11T05:49:41.114Z",
    "managedStatus" : "following",
    "phase" : "warm",
    "ilmExplain" : "{\n  \"indices\": {\n    \".ds-console-2021.08.18-000002\": {\n      \"index\": \".ds-console-2021.08.18-000002\",\n      \"managed\": true,\n      \"policy\": \"console\",\n      \"lifecycle_date_millis\": 1629277498775,\n      \"age\": \"2.64h\",\n      \"phase\": \"hot\",\n      \"phase_time_millis\": 1629277450334,\n      \"action\": \"complete\",\n      \"action_time_millis\": 1629278605586,\n      \"step\": \"complete\",\n      \"step_time_millis\": 1629278605586,\n      \"phase_execution\": {\n        \"policy\": \"console\",\n        \"phase_definition\": {\n          \"min_age\": \"0s\",\n          \"actions\": {\n            \"rollover\": {\n              \"max_size\": \"1gb\",\n              \"max_age\": \"1d\",\n              \"max_docs\": 10000\n            },\n            \"set_priority\": {\n              \"priority\": 1000\n            }\n          }\n        },\n        \"version\": 1,\n        \"modified_date_in_millis\": 1629277370953\n      }\n    }\n  }\n}"
  } ],
  "Headers" : {
    "X-Managed-Count" : 15,
    "X-Managed-StorageSize" : 18093942932,
    "X-OSS-Count" : 5,
    "X-OSS-StorageSize" : 9093942932
  }
}

Error codes

For a list of error codes, visit the API Error Center.