IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Change passwords API
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Change passwords API
editChanges the passwords of users in the native realm and built-in users.
Description
editYou can use the create user API to update everything
but a user’s username
and password
. This API changes a user’s password.
For more information about the native realm, see Realms and Configuring a native realm.
Path Parameters
edit-
username
- (string) The user whose password you want to change. If you do not specify this parameter, the password is changed for the current user.
Request Body
edit-
password
(required) - (string) The new password value.
Authorization
editEvery user can change their own password. Users with the manage_security
privilege can change passwords of other users.
Examples
editThe following example updates the password for the jacknich
user:
POST /_security/user/jacknich/_password { "password" : "s3cr3t" }
A successful call returns an empty JSON structure.
{}
Was this helpful?
Thank you for your feedback.