Get Role by Role ID
get
/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
Supported Media Types
- application/json
Path Parameters
-
roleid(required): string
Role ID of the role to be returned.
Query Parameters
-
fields: 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
Supported Media Types
- application/json
200 Response
Successful
Headers
-
ResponseTime: string
Captures the time in milliseconds taken for processing the request.
401 Response
Unauthorized
404 Response
Requested entity not found
500 Response
Internal Server Error
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/10
Example of GET Response Body
The following example shows the contents of the response body in JSON format.
{ "links": [ { "rel": "self", "href": "http://pseudo.com/iam/governance/selfservice/api/v1/roles/10" } ], "id": "10", "fields": [ { "name": "Role Name", "value": "Fraud Supervisor" }, { "name": "Owner Login", "value": "SYSTEM ADMINISTRATOR" }, { "name": "ugp_update", "value": "2019-03-11T21:58:40Z" }, { "name": "ugp_createby", "value": 1 }, { "name": "Owner Last Name", "value": "Administrator" }, { "name": "Role Key", "value": "10" }, { "name": "Owner First Name", "value": "System" }, { "name": "ugp_create", "value": "2019-03-11T21:58:40Z" }, { "name": "Role Display Name", "value": { "base": "Fraud Supervisor" } }, { "name": "ugp_updateby", "value": 1 }, { "name": "Owner Display Name", "value": "System Administrator" }, { "name": "Role Unique Name", "value": "Fraud Supervisor" }, { "name": "Role Category Key", "value": 1 }, { "name": "Role Owner Key", "value": 1 }, { "name": "Owner Email", "value": "donotreply@pseudo.com" }, { "name": "Role Namespace", "value": "Default" }, { "name": "Role Category Name", "value": "Default" }, { "name": "Role Owner Key", "value": 1, "link": { "rel": "self", "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/1" } } ] }