Get role
/iam/governance/selfservice/api/v1/roles/{roleid}
Returns role details for particular role ID. The response payload can be controlled by specifying the fields query parameter. If no fields parameter is specified then all the attributes of the role are returned.
Request
- application/json
-
roleid: string
Role ID of the role to be returned.
-
fields(optional): string
A Comma-separated list of the attribute names is to be passed to the fields query parameter. For example to get only the role display name, unique name and description the URI is "/role?fields=Role Unique Name,Role Display Name,Role Description" The response contains the Role Key and the Role id which are the unique identifiers for the role.
Response
- application/json
200 Response
-
ResponseTime: string
Captures the time in milliseconds taken for processing the request.
object
-
href(optional):
string
-
rel(optional):
string
401 Response
404 Response
500 Response
Examples
This example demonstrates the ability to retrieve a single role definition. The information shown here is against a pseudo system and serves as a prototype.
cURL Example
curl -H "Content-Type: application/json" -X GET -u username:password https://pseudo.com/iam/governance/selfservice/api/v1/roles/7
Example of GET Response Body
The following example shows the contents of the response body in JSON format.
{ "id": "7", "name": "Role1", "displayname": "Role1", "attributes": { "Role Display Name": { "base": "Role1" }, "Role Unique Name": "Role1", "Owner Login": { "Links": { "rel": "self", "href": "http://pseudo.com/iam/goverance/selfservice/api/v1/roles/SYSTEM_ADMINISTRATOR" }, "value": "XELSYSADM" }, "ugp_createby": 1, "Role Owner Key": 1, "Role Description": null, "Role Name": "Role1", "ugp_create": 1456753163000, "ugp_update": 1456754274000, "Owner Email": "donotreply@mydomain.com", "Role Namespace": "Default", "Owner Display Name": "System Administrator", "Role Key": "7", "LDAP GUID": null, "ugp_updateby": 1, "Request Id": "2001", "Role Category Key": 1, "Owner Last Name": "Administrator", "User Membership Rule": null, "ugp_data_level": null, "Role Email": null, "LDAP DN": null, "Owner First Name": "System", "Role Category Name": "Default" }, "linkDatalst": [ ] }