Queries the health status of a specified Elasticsearch cluster.
An Elasticsearch cluster can be in a health state indicated by one of the following colors:
- GREEN: Primary shards and replica shards for the primary shards are normally allocated.
- YELLOW: The primary shard is allocated normally and the secondary shard is not allocated normally.
- RED: Primary shards are not normally allocated.
Debugging
Request headers
This operation uses only common request headers. For more information, see Common request headers.
Request syntax
GET /openapi/instances/{InstanceId}/elasticsearch-health HTTP/1.1
Request parameters
Parameter | Type | Position | Required | Example | Description |
---|---|---|---|---|---|
InstanceId | String | Path | Yes | es-cn-tl325wxga000l**** | The request ID. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | 200 | The response code. |
Message | String | success | The response message. |
RequestId | String | 0731F217-2C8A-4D42-8BCD-5C352866E3B7 | The request ID. |
Result | String | GREEN | The color that indicates the health status of the cluster. |
Examples
Sample requests
GET /openapi/instances/[es-cn-tl325wxga000l****]/elasticsearch-health HTTP/1.1
Common request header
Sample success responses
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Result" : "GREEN",
"RequestId" : "0731F217-2C8A-4D42-8BCD-5C352866E3B7"
}
HTTP status code
For a list of error codes, see Service error codes.