Example: Changing a user account password in the request body

Content Platform Tenant Management Help

File Size
4269 KB
Part Number

Here’s a sample POST request that uses the updatePasswordRequest data type in the request body to change the password for a Finance tenant user account with the username lgreen . The requested new password is End321!, which is specified in an XML file named Password.xml. The request is made using a system-level user account that includes the security role.

Request body in XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

Request with cURL command line

curl -k -i -d @Password.xml -H "Content-Type: application/xml"
    -H "Authorization: HCP YWxscm9sZXM=:04EC9F614D89FF5C7126D32ACB448382"

Request headers

POST /mapi/tenants/finance/userAccounts/lgreen/changePassword HTTP/1.1
Host: admin.hcp.example.com:9090
Authorization: HCP YWxscm9sZXM=:04EC9F614D89FF5C7126D32ACB448382
Content-Type: application/xml
Content-Length: 2

Response headers

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 0