Change a user's password

Available in versions: 25.3 and later

Description

Updates a user's password.

URL

Copy code
/loadtest/rest/user/UpdatePassword

HTTP method

POST: Updates a user's password.

Request

Headers:

One of the following:

  • Content-Type: application/xml

  • Content-Type: application/json

Cookies:

ADM_LWSSO={AdmLwssoCookie};

Request body:

An XML or JSON that contains the following fields.

ElementDescription
OldPassword

The user's current password.

The password must be in Base64 format.

NewPassword

A new password that meets the password policy requirements.

The password must be in Base64 format.

ReTypeNewPassword

Retype the new password.

Request example:

Copy code
XML example:
POST http://<LRE_Server>/loadtest/rest/user/UpdatePassword
Content-Type: application/xml
Accept: application/xml
Cookie: ADM_LWSSO={AdmLwssoCookie};

<UpdatePassword xmlns="http://www.hp.com/PC/REST/API">
    <OldPassword>my_old_pw</OldPassword>
    <NewPassword>my_new_pw</NewPassword>
    <ReTypeNewPassword>my_new_pw</ReTypeNewPassword>
</UpdatePassword>
Copy code
JSON example:
POST http://<LRE_Server>/loadtest/rest/user/UpdatePassword
Content-Type: application/JSON
Accept: application/json
Cookie: ADM_LWSSO={AdmLwssoCookie};

{
"OldPassword": "my_old_pw",
"NewPassword": "my_new_pw",
"ReTypeNewPassword": "my_new_pw"
}

Response

Headers:

None

Cookies:

None

HTML Return Code:

One of the HTTP return codes.

Upon successful update of a user password, returns HTTP status 200 (OK).

If the call failed, returns HTTP status 400 Bad Request or 401 Unauthorized.

See also: