Changing an account password
Now that we know the ID of the account, we can now change its password. The endpoint used to achieve this is PATCH /accounts({accountKey}).
From Swagger UI, locate PATCH /accounts({accountKey}), which is under Accounts.
Click PATCH /accounts({accountKey}) .
Click Try it out.
Fill in the accountKey field, and provide json containing the operation and password in the request body.
PATCH /accounts({accountKey}) supports replace, remove and test operations.
replace: change a password
remove: remove a password
test: verify a password
An example json looks like:
[ { "op":"replace", "path":"/password", "value":"Qwerty123" } ]
Here, we will change the account’s password to
Qwerty123
using the replace operation.Click Execute.
Check that the endpoint returned a 202 (Accepted) code; the request was successfully submitted, however it does not tell us the status of the password change.
The response header returns a location field, containing the operation key of the request (in this case, 90cd48c8-e1de-4801-981e-a7699c2a4ec6) We will use that to get the operation result.