Get list of security groups for a specific user by login name
get
/PASService/rest/services/v1/users/{loginName}/securityGroups
Gets a list of security groups for a specific user.
Request
Path Parameters
-
loginName(required): string
UserName
Query Parameters
-
limit(required): integer(int32)
This parameter restricts the number of resources returned inside the resource collection. If the limit exceeds the resource count then the framework will only return the available resources.
-
offset(required): integer(int32)
Used to define the starting position of the resource collection. If offset exceeds the resource count then no resources are returned. Default value is 0.
There's no request body for this operation.
Back to TopResponse
200 Response
This operation fetches a list of security groups for a specific user by login name successfully.
Examples
This example describes how to get security group(s) for a specific user.
Example cURL Command
Use the following cURL command to submit a request on the REST resource:
curl \ -X GET \ -H "Content-Type: application/json" \ -u 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \ -L "http://server:port/PASService/rest/services/v1/users/qatester3/securityGroups"
Example Response Body
The following shows an example of the response body in JSON format:
{ "count": 3, "offset": 0, "limit": 100, "securityGroups": [ { "links": [ { "href": "http://server:port/PASService/rest/services/v1/securityGroups/Prototype Super", "rel": "self", "mediaType": "application/json", "method": "GET" } ], "securityGroupGuid": "0BC5B169-5C30-4D47-81BE-95E56AC1B54A", "roleEffectiveFrom": "2002-01-01T00:00:00", "roleEffectiveTo": "2021-08-19T10:24:56", "securityGroupName": "Prototype Super", "clientNumber": "Prototype Super" }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/securityGroups/Super", "rel": "self", "mediaType": "application/json", "method": "GET" } ], "securityGroupGuid": "2F5BD91E-0029-482B-B3A2-3462D1033D41", "roleEffectiveFrom": "1990-01-01T00:00:00", "roleEffectiveTo": "2021-08-19T10:24:56", "securityGroupName": "Super", "clientNumber": "Super" }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/securityGroups/International Super", "rel": "self", "mediaType": "application/json", "method": "GET" } ], "securityGroupGuid": "B85DB228-A621-4EB1-AE16-2CA9C5AA1DCA", "roleEffectiveFrom": "2001-01-01T00:00:00", "roleEffectiveTo": "2021-08-19T10:24:56", "securityGroupName": "International Super", "clientNumber": "International Super" } ] }