Get user permissions

GET/users/{userId}/permissions

Base URL: https://api.tinkermode.com

Get permissions of the user.

Authentication

Send an Authorization header of the form ModeCloud <AUTH_CODE>.

Must contain API key of the matching user, or the API key of a user with management permissions on the all resource type, or a service account token with the matching permission, or a Project API Key with admin permission.

Path parameters

NameTypeRequiredConstraintsDescription
userIdintegerYesThe unique ID for the specified user.

Responses

200 Successfully retrieved user permissions.

Content type: application/json

Represents a permission of user.

An array of objects with the following shape:

PropertyTypeRequiredConstraintsDescription
actionsobjectYesread-only (server-generated)Resource IDs on which the user can perform actions. If the user has all objects access for the resource type, it contains “*” or “root” instead of listing all resource IDs.
Properties of actions
PropertyTypeRequiredConstraintsDescription
createarrayNoread-only (server-generated)A list of resource IDs
deletearrayNoread-only (server-generated)A list of resource IDs
managePermissionsarrayNoread-only (server-generated)A list of resource IDs
readarrayNoread-only (server-generated)A list of resource IDs
updatearrayNoread-only (server-generated)A list of resource IDs
resourceTypestringYesread-only (server-generated); one of: all, accessControlGroup, user, userLog, home, homeKeyValue, homeLog, homeDevice, homeSmartModuleREST, homeEvent, homeAlert, entityClass, entity, entityMetric, entityBlob, entityAlert, entityAlertRule, entityAssistant, entityScheduledReportConfiguration, entityScheduledReportExecution, entityAppProxy, entityCustomLog, alertRule, projectLog, projectAlertResource type

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.

404 The requested permission does not exist or is not accessible.

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.