Get access control groups
GET/accessControlGroups
Base URL: https://api.tinkermode.com
Get a list of access control groups. Either the projectId, readableByUserId, memberUserId, or memberServiceAccountId must be specified. These parameters are mutually exclusive, and a request that combines more than one of them is rejected with a 400 INVALID_REQUEST response. When the search parameter is used, only groups that name or description matching exactly or partially one of the phrases will be returned.
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain a user, service account, or project API key with "Admin" privileges.
Query parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
limit | integer | No | default: 25; min: 1; max: 100 | Maximum number of access control groups to return. |
memberServiceAccountId | integer | No | Return access control groups that a particular service account belongs to. The caller must be a project API key with "Admin" privileges or a super admin user in a project with permission based access control enabled. | |
memberUserId | integer | No | Return access control groups that a particular user belongs to. If the request is made by a user, memberUserId must be the ID of the user, or the user must have manage permissions for all resources. | |
projectId | integer | No | Return access control groups of the specified project. If the request is made by a user, the user must have read permission for all access control group. | |
readableByUserId | integer | No | Return access control groups that a particular user can read. If the request is made by a user, readableByUserId must be the ID of the user, or the user must have manage permissions for all resources. | |
search | string | No | Search for groups by keywords. The search string may contain multiple phrases separated by whitespaces. | |
skip | integer | No | default: 0; min: 0 | Number of access control groups to skip over. |
Responses
200 Successful retrieval of list of access control groups.
Content type: application/json
Represents a group of access permissions on resources
An array of objects with the following shape:
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
description | string | Yes | Description of group. | |
id | integer | Yes | read-only (server-generated) | Unique ID assigned at time of creation. |
name | string | Yes | Display name of group. | |
projectId | integer | Yes | read-only (server-generated) | Project that this access control group belongs to. |
Response example
[
{
"description": "A group to access all devices in the project",
"id": 1,
"name": "Customer Support",
"projectId": 10
},
{
"description": "A group to manage customer support user accounts",
"id": 2,
"name": "Customer Support Admin",
"projectId": 10
}
]401 Authorization is required to access this resource.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
403 Request failed because of denied permission.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
429 Request failed because of rate limit.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
500 An unexpected error has occurred.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
503 The service is temporarily unavailable.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |