Make API requests
Send an HTTP request to the Elasticsearch endpoint with the required parameters. The system returns a UTF-8 encoded response.
Service endpoint
The API endpoint for Alibaba Cloud Elasticsearch is elasticsearch.<RegionId>.aliyuncs.com.
<RegionId> is required. Replace this parameter with the ID of the region where your instance is located. For more information about region IDs, see Parameter descriptions.
Protocols
You can send requests over HTTP or HTTPS. We recommend HTTPS for security purposes.
Request syntax
Alibaba Cloud Elasticsearch provides RESTful APIs with the following request structure:
HTTPMethod /resource_URI_parameters
RequestHeader
RequestBody
-
HTTPMethod: The request method, such as PUT, POST, PATCH, GET, and DELETE.
-
resource_URI_parameters: The identifier of the resource to call, such as
/cluster. -
RequestHeader: The request header, which typically includes the API version, Host, and Authorization. For more information, see Common parameters.
-
RequestBody: The request body, which contains common request parameters (such as the API version and identity verification) and API-specific parameters.
Sample request:
POST /openapi/instances/es-cn-n6w1o1x0w001c****/actions/recover-zones HTTP/1.1
Common request headers
["cn-hangzhou-i","cn-hangzhou-h"]
Request encoding
Requests and responses are encoded in UTF-8.