Change Password

Change Password
Change your own password

Changes the password of the currently authenticated local user. This is a self-service operation - a user can only change their own password, and must provide their current (old) password to prove ownership.

Notes:

  • Only local users have a password to change. Remote (LDAP) users manage their password through their identity provider.
  • To reset another local user's password without knowing their current password, an enterprise_admin must use POST /iam/reset-password instead.
Request
URI
POST
https://{api_host}/https://{api_host}:{port}/lh-appliance/iam/change-password
COPY
Request Body
ChangePasswordRequest of type(s) application/json
Required
{
    "old_password": "********",
    "new_password": "********"
}
string
old_password
Optional

The user's current password. Required to prove ownership of the account before it is changed.

string
new_password
Optional

The password to set. Must satisfy the configured password policy, or the request is rejected with 400.

Authentication
This operation uses the following authentication methods.
Responses
204

The password was changed successfully.

Operation doesn't return any data structure

400

The old password is incorrect, or the new password does not meet the password policy.

Returns Error of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required

Message describing the error.


401

Unauthorized

Returns Unauthorized of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required

Message describing the error.


403

Forbidden

Returns Forbidden of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required

Message describing the error.


412

Precondition Failed

Returns PreconditionFailed of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required

Message describing the error.


428

Precondition Required

Returns PreconditionRequired of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required

Message describing the error.


429

Too Many Requests

Returns TooManyRequests of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required

Message describing the error.


default

4XX and 5XX type errors with appropriate message

Returns Error of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required

Message describing the error.


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/https://{api_host}:{port}/lh-appliance/iam/change-password