GET/depts/{DeptId}/users/{Id}/secuirtygroups

Applies to QAComplete 12.80 SaaS, last modified on April 20, 2021

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:

http://{server}/rest-api/service/api/v1/depts/{DeptId}/users/{UserId}/securitygroups?offset={offset}&limit={limit}

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 john@example.com: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"
      }
  ]
}

See Also

Security Groups REST API Reference

Highlight search results