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

NameTypeRequiredConstraintsDescription
limitintegerNodefault: 25; min: 1; max: 100Maximum number of access control groups to return.
memberServiceAccountIdintegerNoReturn 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.
memberUserIdintegerNoReturn 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.
projectIdintegerNoReturn 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.
readableByUserIdintegerNoReturn 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.
searchstringNoSearch for groups by keywords. The search string may contain multiple phrases separated by whitespaces.
skipintegerNodefault: 0; min: 0Number 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:

PropertyTypeRequiredConstraintsDescription
descriptionstringYesDescription of group.
idintegerYesread-only (server-generated)Unique ID assigned at time of creation.
namestringYesDisplay name of group.
projectIdintegerYesread-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

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

403 Request failed because of denied permission.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

429 Request failed because of rate limit.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

500 An unexpected error has occurred.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

503 The service is temporarily unavailable.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.