Returns the list of security groups to which a specified user belongs.
Use this operation to obtain the information about projects the specified user is attending and the user's security groups within these projects.
Authentication
Basic authentication using a user’s login and password. See Authentication for details.
Security Rights
The authenticating user must have administrator privileges.
Request Format
To get information on the user's security groups, send a GET request to the following URL:
offset : integer, default: 0
The number of security groups to skip before counting the returned security groups. The default value is 0, which is the offset of the first item. For details, see Paging Through Results Using Offset and Limit.
DeptId : integer, required
The ID of the department.
UserId : integer, required
The ID of the needed user.
offset : integer, default: 0
The number of security groups to skip before counting the returned groups. The default value is 0, which is the offset of the first item. For details, see Paging Through Results Using Offset and Limit.
limit : integer, default: 25
The maximum number of security groups to return in the response.
A sample request:
GET http://yourserver.com/rest-api/service/api/v1/depts/8162/users/24793/securitygroups HTTP/1.1
Host: yourserver.com
Connection: keep-alive
Accept: application/json
Authorization: Basic am9obkBleGFtcGxlLmNvbTpwQHNzd29yZA==
A sample request made by using cURL:
curl -u [email protected]:p@ssword -H "Accept: application/json" http://yourserver.com/service/api/v1/depts/8162/users/24793/escuritygroups
Response Format
If successful, the operation responds with HTTP status code 200 and returns a JSON object with security group information.
If the operation fails, it returns the appropriate status code and (optionally) the error description in the response body.
A sample response:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 169
{
"metadata": {
"result_set": {
"count": 1,
"offset": 0,
"limit": 25,
"total": 1
},
"permissions": {
"acl": 7
}
},
"results": [
{
"id": 12345,
"name": "Security Administrator"
}
]
}
Metadata about the security group list.
Pagination information about the security group list. (See Paging Through Results Using Offset and Limit.)
The number of returned security groups.
The offset of the first security group requested.
The maximum number of security groups requested.
The total number of security groups.
The authenticating user’s rights to access security groups.
Access rights:
- 0 - None
- 1 - Read
- 2 - Update
- 3 - Read and update
- 4 - Delete
- 5 - Read and delete
- 7 - Full access
An array of available security groups.
The department ID.
The department name.
The project name.
The unique identifier of the project.
The name of the security group to which the user belongs.