mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-24 17:09:48 +00:00
[DOCS] Format change password API (elastic/x-pack-elasticsearch#2573)
Original commit: elastic/x-pack-elasticsearch@d1fc1a6116
This commit is contained in:
parent
42f90b25e3
commit
3e68a89a45
@ -3,11 +3,36 @@
|
||||
=== 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.
|
||||
of a user.
|
||||
|
||||
To change the password of the logged in user, submit a POST request to the
|
||||
`_xpack/security/user/_password` endpoint:
|
||||
==== Request
|
||||
|
||||
`POST _xpack/security/user/_password` +
|
||||
`POST _xpack/security/user/<username>/_password`
|
||||
|
||||
|
||||
==== Path Parameters
|
||||
|
||||
`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
|
||||
|
||||
`password` (required)::
|
||||
(string) The new password value.
|
||||
|
||||
|
||||
==== Authorization
|
||||
|
||||
Every user can change their own password. Users with the `manage_security`
|
||||
privilege can change passwords of other users.
|
||||
|
||||
|
||||
==== Examples
|
||||
|
||||
The following example updates the password for the `elastic` user:
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user