The system-level user account resource lets you change the password for a locally authenticated system-level user account. The table below provides information about this resource.
Data Type | Method | Use | Access | Notes |
---|---|---|---|---|
.../userAccounts/ | ||||
N/A | POST | Change the password for a locally authenticated system-level user account | System-level user account with the security role |
The required query parameter for changing user account passwords is password=password. For the rules for passwords, see Passwords. |
Here’s a sample POST request that changes the password for the system-level user account with the username lgreen to End321!. The request is made using a system-level user account that includes the security role.
Request with cURL command line
curl -k -i -d "{}" -H "Content-Type: application/json"
-H "Authorization: HCP YWxscm9sZXM=:04EC9F614D89FF5C7126D32ACB448382"
"https://admin.hcp.example.com:9090/mapi/userAccounts/lgreen?password=End321!"
Request in Python using PycURL
import pycurl
curl = pycurl.Curl()
curl.setopt(pycurl.HTTPHEADER, ["Authorization: HCP \
YWxscm9sZXM=:04EC9F614D89FF5C7126D32ACB448382"])
curl.setopt(pycurl.URL,
"https://admin.hcp.example.com:9090/mapi/" +
"userAccounts/lgreen?password=End321!")
curl.setopt(pycurl.SSL_VERIFYPEER, 0)
curl.setopt(pycurl.SSL_VERIFYHOST, 0)
curl.setopt(pycurl.CUSTOMREQUEST, "POST")
curl.perform()
print curl.getinfo(pycurl.RESPONSE_CODE)
curl.close()
Request headers
POST /mapi/userAccounts/?password=End321! HTTP/1.1
Host: admin.hcp.example.com:9090
Authorization: HCP YWxscm9sZXM=:04EC9F614D89FF5C7126D32ACB448382
Content-Type: application/json
Content-Length: 2
Response headers
HTTP/1.1 200 OK
Content-Type: application/xml
X-HCP-SoftwareVersion: 7.3.0.8
Content-Length: 0
© 2016 Hitachi Data Systems Corporation. All rights reserved.