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. You can use OpenAPI Explorer to search for API operations, call API operations, and dynamically generate SDK sample codes.

Request parameters

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

Request structure

GET /openapi/instances/[InstanceId]/indices HTTP/1.1

Request parameter

Parameter Type Location 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.

isManaged Boolean Query No false

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

  • true: only the indexes in the hosting are viewed.
  • false (default): View all indexes.
isOpenstore Boolean Query No false

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

  • true: View only the OpenStoreCold section index.
  • flase (default): View all indexes.
page Integer Query No 1

The page number of the returned page. Minimum value: 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
Headers Struct

The header of the response.

X-Managed-Count Integer 15

The total number of indexes in Cloud Hosting.

X-Managed-StorageSize Long 18093942932

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

X-OSS-Count Integer 5

The total number of OpenStore cold stage indexes.

X-OSS-StorageSize Long 9093942932

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

RequestId String F99407AB-2FA9-489E-A259-40CF6DCC****

The ID of the request.

Result Array of Result

The details of the index list.

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

The time when the index list was queried.

health String green

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

  • green: healthy.
  • yellow: alerts.
  • red: an exception.
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.

isManaged String false

This parameter is deprecated.

managedStatus String closing

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

  • following: Hosting.
  • closing: The host is being canceled.
  • closed: unmanaged.
name String .kibana_task_manager_1

The name of the index.

phase String warm

The current storage lifecycle. Value meaning:

  • warm: warm stage.
  • 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.
size Long 49298589

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

Examples

Sample requests

GET /openapi/instances/es-cn-tl329rbpc0001****/indices HTTP/1.1

Sample success responses

JSON format

{
    "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",
            "phase": null,
            "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.