Get Role Members

get

/iam/governance/selfservice/api/v1/roles/{roleid}/members

Returns role members for particular roleid.

Request

Supported Media Types
Path Parameters
Query Parameters
  • The payload contains the role members i.e. the user's information. The payload can be restricted by specifying the user attributes which are of interest. For example to get only the User Login and DisplayName of all the role members of a role the URI will be /roles/{roleid}/members?membershipType=all&fields=User Login, DisplayName
  • The query parameter enables to get the the role members based on the membership type. The role membership type can be either direct/indirect/dynamic/all. If no membershipType is explicitly mentioned the default membershipType selected is "ALL". The "all" membershipType option will return all the role members who have the role membership directly, indirectly (i.e. the user is a member of a child role) and dynamically (i.e. based on the Role membership rule).
  • Filters the users list returned based on the filter parameter. The User attributes can be used to filter the role members of interest. For example to get all the direct role members with employee number greater than 1000 the filter will be /roles/{roleid}/members?membershipType=direct&q=Employee Number gt 1000
Back to Top

Response

Supported Media Types

200 Response

Successful
Headers
Body ()
Root Schema : RoleMembersGetResponse
Type: object
Show Source
Nested Schema : members
Type: array
Show Source
Nested Schema : LinkDataInstances
Type: object
Show Source
Nested Schema : RoleMember
Type: object
Show Source
Nested Schema : RoleMembersUserInfo
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 retrieval of direct members for a given role. 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/8/members?membershipType=DIRECT

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/8/members?
membershipType=DIRECT&offset=1&limit=10"
        },
        {
            "rel": "first",
            "href": "http://pseudo.com/iam/governance/selfservice/api/v1/roles/8/members?
membershipType=DIRECT&offset=1&limit=10"
        }
    ],
    "count": 2,
    "hasMore": false,
    "totalResult": -1,
    "users": [
        {
            "links": [
                {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/24"
                }
            ],
            "id": "24",
            "userLogin": "BKIDDO",
            "email": "beatrix.kiddo@vision.com",
            "startDate": "2019-03-26T18:05:09Z"
        },
        {
            "links": [
                {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/82"
                }
            ],
            "id": "82",
            "userLogin": "TEST55",
            "email": "TEST55@vision.com",
            "startDate": "2019-03-11T22:39:16Z"
        }
    ]
}
Back to Top