2017-06-28 14:02:40 -04:00
|
|
|
[role="xpack"]
|
2017-04-06 21:04:39 -04:00
|
|
|
[[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
|