You can call this operation to change the password of the elastic account for a specified Elasticsearch instance.

Notice Before you call this operation, make sure that the instance is not in the activating, invalid, or inactive state.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request header

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

Request syntax

POST /openapi/instances/[InstanceId]/admin-pwd HTTP/1.1

Request parameters

Parameter Type Required Example Description
InstanceId String Yes es-cn-xxx

The ID of the instance.

clientToken String No 5A2CFF0E-5718-45B5-9D4D-70B3FF****

A unique token generated by the client to guarantee the idempotency of the request. The maximum length of the token is 64 ASCII characters.

You must specify request body parameters. For more information, see Sample requests.

Response parameters

Parameter Type Example Description
RequestId String 0FA05123-745C-42FD-A69B-AFF48EF9****

The ID of the request.


Sample requests

POST /openapi/instances/[InstanceId]/admin-pwd HTTP/1.1
Common request header
  "InstanceId": "es-cn-xxx"

Request body

 Sample request body:
  "esAdminPassword": "Elastic123*"

Sample success responses

XML format


JSON format


Error codes

For a list of error codes, visit the API Error Center.