OpenSearch/docs/en/rest-api/security/change-password.asciidoc
Lisa Cawley 08fdac5a93 [DOCS] Move security APIs to Elasticsearch Ref (elastic/x-pack-elasticsearch#1877)
* [DOCS] Move security APIs to Elasticsearch Ref

* [DOCS] Update links to security APIs

* [DOCS] Fix link to security APIs

Original commit: elastic/x-pack-elasticsearch@d7a9d3f1ab
2017-06-28 11:02:40 -07:00

28 lines
792 B
Plaintext

[role="xpack"]
[[security-api-change-password]]
=== Change Password API
The Change Password API enables you to submit a request to change the password
of a user. Every user can change their own password and users with the
`manage_security` privilege can change passwords of other users.
To change the password of the logged in user, submit a POST request to the
`_xpack/security/user/_password` endpoint:
[source,js]
--------------------------------------------------
POST _xpack/security/user/elastic/_password
{
"password": "changeme"
}
--------------------------------------------------
// CONSOLE
A successful call returns an empty JSON structure.
[source,js]
--------------------------------------------------
{}
--------------------------------------------------
// TESTRESPONSE