/auth/v1/users/<user_ID>/role_assignment: GET

Returns a list of the roles and associated collections assigned to the user where applicable. This does not include any role assignments inherited from groups that the user belongs to.

The following table shows which roles can access this REST API endpoint:
Table 1. Access by role
Data admin Data user Collection Admin Admin Service user
X X

Synopsis of the request URL

curl -k -H ‘Authorization: Bearer <token>’ https://<spectrum_discover_host>/auth/v1/users/<user_id>/role_assignments 

Supported request types and response formats

Supported request types:
  • GET
Supported response formats:
  • JSON

Examples

The following example shows how to get the details of the roles that is assigned to a specific user:

Request:
curl -k -H ‘Authorization: Bearer <token>’ https://<spectrum_discover_host>/auth/v1/users/ 4ee5b47f439640d29b6fac7253a64290/role_assignments 

Response:

Returns 200 OK:
{  
    "roles":[  
        {  
            "collections":[  
                {  
                    "description":"Bootstrap project for initializing the cloud.",
                    "domain_id":"default",
                    "enabled":true,
                    "id":"09dd9136eaa6416784d6c5bdf3fa2f78",
                    "is_domain":false,
                    "name":"spectrum-discover",
                    "parent_id":"default",
                    "tags":[]
                }
            ],
            "domain_id":"domain_id",
            "id":"5f365cf289d14c93a986b8bea976f92b",
            "name":"collectionadmin"
        }
    ]
}