GET/depts/{DeptId}/securitygroups

Applies to QAComplete 12.75 SaaS, last modified on April 01, 2021

Gets information on security groups in a specified department.

Use this operation to get information on security groups within a department specified by its ID.

To get information on a specific security group, use the /depts/{DeptId}/securitygroups/{Name} (GET) operation.

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 security groups, send a GET request to the following URL:

http://{server}/rest-api/service/api/v1/depts/{DeptId}?offset={offset}&limit={limit}&Filter={filter}

DeptId  :  integer, required

The ID of the needed department.

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.

limit  :  integer, default: 25

The maximum number of security groups to return in the response.

filter  :  string

The filter expression to apply to the returned list. See Search Filters.

A sample request:

GET http://yourserver.com/rest-api/service/api/v1/depts/8162/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/securitygroups

Response Format

If successful, the operation responds with HTTP status code 200 and returns a JSON object with the security groups information.

A sample response:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 172


{
    "metadata": {
       "result_set": {
          "count": 1,
          "offset": 0,
          "limit": 25,
          "total": 1
       },
        "permissions": {
            "acl": 7
       }
    },
    "results": [
       {
      "name": "Administator"
       },
       {
      "name": "User"
       },
      {
    ]
  }

Error responses

If the operation fails, it returns the appropriate status code and (optionally) the error description in the response body.

See Also

Security Groups REST API Reference

Highlight search results