Get a permission
GET/permissions/{permissionStatementId}
Base URL: https://api.tinkermode.com
Return the permission with the specified ID.
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain a user, service account, or project API key with "Admin" privileges.
Path parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
permissionStatementId | integer | Yes | The unique ID for a specified permission. |
Responses
200 Successfully retrieved permission with specified ID.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
actions | array<string> | Yes | Allowed/denied actions | |
effect | string | Yes | one of: allow, deny | Access policy |
id | integer | Yes | read-only (server-generated) | Unique ID assigned at time of creation. |
principalId | integer | Yes | read-only (server-generated) | Principal ID such as a user ID or service account ID |
principalType | string | Yes | read-only (server-generated); one of: user, accessControlGroup, serviceAccount | Principal type |
projectId | integer | Yes | read-only (server-generated) | Project that this permission belongs to. |
resourceIdentifier | string | Yes | Resource ID (e.g., user ID, entity ID). * represents all for supported resource types; for entity, use root instead of *. | |
resourceScope | string | No | one of: self, selfWithDescendants, descendants | Resource scope. Only Entity supports resource scope. self covers the entity itself, selfWithDescendants covers the entity and its descendants, and descendants covers its descendants but not the entity itself. descendants is not allowed on root. |
resourceType | string | Yes | read-only (server-generated); one of: all, accessControlGroup, user, home, entity, entityClass, device, alertRule, alertSchedule, projectLog, projectAlert, projectFile, dataFilter, assistant, projectBizstackApp | Resource type |
statementType | string | Yes | read-only (server-generated); one of: principalBased | Statement type |
subResources | array<object> | No | Array of sub-resource permissions |
Response example
{
"id": 13,
"projectId": 2,
"statementType": "principalBased",
"principalType": "user",
"principalId": 2,
"resourceType": "homes",
"resourceIdentifier": "2",
"actions": [
"read",
"create",
"update",
"delete",
"managePermissions"
],
"effect": "allow"
}
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. |
404 The requested permission does not exist or is not accessible.
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. |