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
Path Parameters
Query Parameters
  • 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.
Back to Top

Response

Supported Media Types

200 Response

Successful
Headers
Body ()
Root Schema : RoleGetResponse
Type: object
Show Source
Nested Schema : fields
Type: array
Show Source
Nested Schema : Fields
Type: object
Show Source
Nested Schema : LinkDataInstances
Type: object
Show Source

401 Response

Unauthorized

404 Response

Requested entity not found

500 Response

Internal Server Error
Back to Top

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"
            }
        }
    ]
}
Back to Top