To send an Elasticsearch API request, you must send an HTTP request to the Elasticsearch endpoint. You must add the request parameters that correspond to the API operation being called. After you call the API operation, the system returns a response. The request and response are encoded in UTF-8.


The endpoint of the Elasticsearch API is elasticsearch.<RegionId>
Note The <RegionId> parameter is required. You must replace it with the ID of the region where your Elasticsearch cluster resides. For more information about how to obtain the ID, see Parameters.


You can send requests over HTTP or HTTPS. For security purposes, we recommend that you send requests over HTTPS.

Request syntax

The following code provides the request syntax:

HTTPMethod /resource_URI_parameters
  • HTTPMethod: the method of the HTTP request, such as PUT, POST, PATCH, GET, and DELETE.
  • resource_URI_parameters: the identifier of the resource that you want to access, such as /cluster.
  • RequestHeader: the request headers. In most cases, information such as the API version number, hostname, and authentication information is included. For more information, see Common parameters.
  • RequestBody: the request parameters. The parameters include common request parameters and operation-specific request parameters. The common request parameters contain information such as the API version number and authentication information.

Sample request:

POST /openapi/instances/es-cn-n6w1o1x0w001c****/actions/recover-zones HTTP/1.1
Common request parameters


The request and response are encoded in UTF-8.