How to assign the site admin role to an ALM Octane user.

  • KM02539841
  • 31-Aug-2016
  • 09-Oct-2019

Summary

Currently the site admin user in ALM Octane on-premise version is the user that was defined during installation. This article provides instructions for assigning the site admin role to another ALM Octane user.

Question

The way to update the site admin user is through the admin REST API in ALM Octane versions up to 12.53.22.
 
Note that the Octane REST API is currently in tech preview level and is subject to change.
To work with this non-public API, you must add a header named HPECLIENTTYPE to each request with the following value: HPE_REST_API_TECH_PREVIEW

 

Answer

To work with the admin REST API, the authenticated user has to have the site admin role.
 

  1. Connect to ALM Octane as a site admin user:
 POST http://<server>:8081/authentication/sign_in


{"user":"<site admin user name>","password":"<site admin password>"}
 

 
  1. To find the ID of the site admin role:
     
GET http://<server>:8081/admin/roles?query="logical_name EQ ^role.site.admin^"
 

  1. Retrieve the site admin role ID from the response.
     
  2. List the roles the user currently has:
     
GET http://<server>:8081/admin/users/<user id>?fields=roles
 
"roles": {
    "total_count": 1,
    "data": [
      {
        "type": "role",
        "id": "<role Id>"
      }
    ]

 

  1. Prepare the Json request body for the update request (in step 6) by adding  the site admin role to the existing roles:
     
{"roles":
{"data":[
{
  "id":"<current user role ID>",
  "type":"role"},
{
  "id":"<site admin role ID>",
   "type":"role"}
]
}
}

 


  1. Update the roles of the user who should be a site admin, adding the Json body created in step 5:
     
PUT http://<server>:8081/admin/users/<user id>
 
{"roles":
{"data":[
{
  "id":"<current user role ID>",
  "type":"role"},
{
  "id":"<site admin role ID>",
   "type":"role"}
]
}
}