Skip to main content

GET /api/v1/auth/roles/{id}

Use this method to return information about a specific role.

Note
This REST API requires Lenovo XClarity Orchestrator v1.2 or later.

Authentication

Authentication with username and password is required.

Resource URI

GET https://{orchestrator_server_IP}/api/v1/auth/roles/{id}

where {id} is the ID of the role. To obtain the role IDs, use GET /api/v1/auth/roles

Query parameters

None

Request body

None

Response codes

CodeDescriptionComments
200OK The request completed successfully. If a single query parameter is specified and the value of that parameter has no matches, the response body returns default values. If a list of query parameters is specified and the value of at least one parameter has no matches, the response body returns only what matches.

Response body

When the request is successful, the following attributes are returned. If the request fails, standard message attributes are returned (see Status messages).

AttributesTypeDescription
idStringRole ID
descriptionStringRole description
functionsArray of stringsInformation about each function that this role can perform
 idStringFunction ID
 nameStringFunction name
 uriStringFunction URI
nameStringRole name
typeStringRole type (translated). This can be one of the following values.
  • custom
  • predefined
typeKeyStringRole type key. This can be one of the following values.
  • custom
  • predefined
userGroupsArray of objectsInformation about each user group that is associated with the role
 idStringUser group ID
 nameStringUser group name
 uriStringUser group URI
_linksObjectRoles URI (see Links)
The following example is returned if the request is successful.
{{
"id":"61f403c6d9197241f2f8ea7a",
"description": "HCI admin description",
"functions": [{
"id": "19A6C913",
"name": "functionName",
"uri": "/api/v1/auth/functions/19A6C913"
}, {
"id": "46CFE971",
"name": "functionName",
"uri": "/api/v1/auth/functions/46CFE971"
}],
"name": "HCI Admin",
"type": "Custom",
"typeKey": "CustomTranslated",
"userGroups": [{
"id": "19A6C945",
"name": "userGrName",
"uri": "/api/v1/auth/userGroups/19A6C945"
}, {
"id": "19A6C343",
"name": "userGrName",
"uri": "/api/v1/auth/userGroups/19A6C343"
}],
"_links": [{
"rel": "self",
"uri": "/api/v1/auth/roles/61f403c6d9197241f2f8ea7a"
}]
}