User password requests
User password requests
Redis Enterprise Software
|
Method |
Path |
Description |
PUT |
/v1/users/password |
Replace the password of the authenticated user |
POST |
/v1/users/password |
Add a new password for the authenticated user |
DELETE |
/v1/users/password |
Delete a password for the authenticated user |
Update password
PUT /v1/users/password
Replaces the password list of the user making this request with a single new password. The request authentication header must include the relevant username and password.
Request
Example HTTP request
PUT /v1/users/password
Example JSON body
{
"new_password": "the new (single) password"
}
Key |
Value |
Description |
Host |
cnm.cluster.fqdn |
Domain name |
Accept |
application/json |
Accepted media type |
Request body
The request must contain a JSON object with the following fields:
Field |
Type |
Description |
new_password |
string |
The new password (required) |
Response
Returns a status code to indicate password update success or failure.
Error codes
When errors are reported, the server may return a JSON object with
error_code
and message
fields that provide additional information.
The following are possible error_code
values:
Code |
Description |
password_not_complex |
The given password is not complex enough (Only work when the password_complexity feature is enabled). |
new_password_same_as_current |
The given new password is identical to one of the already existing passwords. |
Status codes
Add password
POST /v1/users/password
Adds a new password to the password list of the user making this request. The request authentication header must include the relevant username and password.
Request
Example HTTP request
POST /v1/users/password
Example JSON body
{
"new_password": "a password to add"
}
Key |
Value |
Description |
Host |
cnm.cluster.fqdn |
Domain name |
Accept |
application/json |
Accepted media type |
Request body
The request must contain a JSON object with the following fields:
Field |
Type |
Description |
new_password |
string |
New password to add (required) |
Response
Returns a status code to indicate password creation success or failure. If an error occurs, the response body may include a more specific error code and message.
Error codes
When errors are reported, the server may return a JSON object with
error_code
and message
fields that provide additional information.
The following are possible error_code
values:
Code |
Description |
password_not_complex |
The given password is not complex enough (Only work when the password_complexity feature is enabled). |
new_password_same_as_current |
The given new password is identical to one of the already existing passwords. |
Status codes
Delete password
DELETE /v1/users/password
Deletes a password from the password list of the user making this request. The request authentication header must include the relevant username and password.
Request
Example HTTP request
DELETE /v1/users/password
Example JSON body
{
"old_password": "an existing password"
}
Key |
Value |
Description |
Host |
cnm.cluster.fqdn |
Domain name |
Accept |
application/json |
Accepted media type |
Request body
The request must contain a JSON object with the following fields:
Field |
Type |
Description |
old_password |
string |
Existing password to be deleted (required) |
Response
Error codes
When errors are reported, the server may return a JSON object with
error_code
and message
fields that provide additional information.
The following are possible error_code
values:
Code |
Description |
cannot_delete_last_password |
Cannot delete the last password of a user |
Status codes