Manage the System Administrator User Password

Manage the System Administrator User Password
calac41
System administrator (
sa
) users are users with access to all TeamSpaces in 
CA Live API Creator
. The default password for the
sa
user is
Password1
. As a system administrator user, you can manage the 
sa
 user password using the following methods:
Change the System Administrator User Password using cURL
You can manage the 
sa
 user password with an API call by issuing a cURL command. Use the following process.
Verify the Prerequisites
Before managing the
sa
 user password using cURL, ensure that you have determined the correct URL. In the following examples, the portion shown as https://api.acme.com is the portion that you use as the server when you log into API Creator.
Obtain the Authentication Token for the System Administrator User
Issue a cURL command using the following syntax:
curl -d "{"username":"sa","password":"CURRENTPASSWORD"}'
    -H "Content-type: application/json"\
A response similar to the following is expected:
{ "apikey": "
94e248b6a192c006e07a77fdaa7f93b6
", "expiration": "2015-11-06T02:15:50.088Z", "lastLoginTs": "2015-11-04T18:11:34.094Z", "lastLoginIP": "123.45.67.89", "email": "[email protected]acme.com" }
The authentication token for the 
sa
 user is the 
apikey
 value.
Retrieve the checksum Value for the System Administrator User
Issue the following cURL command, using the 
apikey
 value:
curl -H "Authorization: CALiveAPICreator
94e248b6a192c006e07a77fdaa7f93b6:1
" \     -X GET https://api.acme.com/rest/abl/admin/v2/users/2
A response similar to the following is expected:
 This example response shows only relevant content.
[ {    "ident": 2,    "ts": "2015-11-04T18:25:54.072092Z",    "name": "sa",    "fullname": "System Admin",    "email": "[email protected]acme.com",    "status": "A",    "roles": "System administrator",    "data": null,    "comments": null,    "apikey_lifespan": null,    "password_hash": "jA0D60fG+sB310w9MpLVEah/lg/f9aJCnDcPtl14ho55o6koI0zZ+cpxQiwdHFvUuzEF4byogjJ/wV9sbSJp5w==",    "password_salt": "QH7FeE7frVejG1E4KSlU0Q==",    "project_ident": 3,    "@metadata": {        "href": "https://api.acme.com/rest/abl/admin/v2/admin:users/2",        "checksum": "
A:ff8fc7eaad8dbe66
"    } } ]
Change the System Administrator User Password
Changing the
sa
 user password using cURL changes the 
password_hash
 value and stores the salted hash (the 
password_salt
 value), but not to the 
NEWPASSWORD
 value.
Change the 
sa
 user password with a PUT using the 
apikey
 value and the 
checksum
 value. The following code snippet shows an example:
curl -d '{"password_hash":"NEWPASSWORD","@metadata": {"href": "https://api.acme.com/rest/abl/admin/v2/admin:users/2","checksum": "
A:ff8fc7eaad8dbe66
"}}' \     -H "Authorization: CALiveAPICreator
94e248b6a192c006e07a77fdaa7f93b6:1
" \     -H "Content-type: application/json" \     -X PUT
https://api.acme.com/rest/abl/admin/v2/users/2
The following response is expected:
{
    "statusCode": 200,
    "txsummary": [
      {
        "@metadata": {
        "href": "https://api.acme.com/rest/abl/admin/v2/admin:users/2",
        "resource": "admin:users",
        "verb": "UPDATE"
        "checksum": "A:d747ca75b28058ed"
        },
        "ident": 2,
        "ts": "2015-11-04T18:15:17.955629Z",
        "name": "sa",
        "fullname": "System Admin",
        "email": "[email protected]acme.com",
        "status": "A",
        "roles": "System administrator",
        "data": null,
        "comments": null,
        "apikey_lifespan": null,
        "password_hash":      "
9b/4OrzqFbOqELveMlq74pl3yTfD3v3Xrpe2ICBoTMnZ/RE8ZQBUq64bS4y3Dz9ASXh0qWZGq9XdQulSxbOyZQ==
",
        "password_salt": "
QH7FeE7frVejG1E4KSlU0Q=
=",
        "project_ident": 3
      }
   ]
}
The 
sa
 user password is changed.
Change the System Administrator User Password using API Creator
  1. Log in to API Creator as the 
    sa
     user.
    The APIs page appears.
  2. Select 
    Your TeamSpace
     from the gear icon menu at the top right of API Creator.
    The 
    sa (System Admin)
     TeamSpace user is listed and selected by default.
  3. Edit the password, and then save your changes.
The 
sa
 user password is changed.