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.
You can send requests over HTTP or HTTPS. For security purposes, we recommend that you send requests over HTTPS.
The following code provides the request syntax:
HTTPMethod /resource_URI_parameters RequestHeader RequestBody
- 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
- 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.
POST /openapi/instances/es-cn-n6w1o1x0w001c****/actions/recover-zones HTTP/1.1 Common request parameters ["cn-hangzhou-i","cn-hangzhou-h"]
The request and response are encoded in UTF-8.