KB Article #182351
RESTAPI: Update an Account's password with API v2.0 PATCH method
Problem
How to update an account with a local password in SecureTrasnport 5.5 with the APIv2.0 PATCH
method?
Resolution
You can update the password of the account using similar to the below cURL request:
curl -k -u ADMINUSER:ADMINPASS -X 'PATCH' 'https://HOSTNAME:ADMINPORT/api/v2.0/accounts/ACCOUNT_NAME?ownershipChangeMode=none' -H 'accept: */*' -H 'Content-Type: application/json' \ -d '[ { "op": "replace", "path": "/user/passwordCredentials/password", "value": "NEW_PASSWORD" }, { "op": "replace", "path": "/user/passwordCredentials/passwordDigest", "value": null } ]'
In the above command replace:
ADMINUSER:ADMINPASS
with the proper admin credentials (i.e. admin:admin
)
HOSTNAME
with the hotname or IP of SecureTransport
ADMINPORT
with the port, on which the ST's admin service runs on
ACCOUNT_NAME
the name of the account that will be updated
NEW_PASSWORD
the new account password in plain text