Update a permission
PATCH/permissions/{permissionStatementId}
Base URL: https://api.tinkermode.com
Update the permission with the specified ID. The actions, effect, subResources, resourceIdentifier, and resourceScope fields can be changed.
Changing resourceIdentifier requires the caller to have managePermissions on both the current and the new target resource.
The resourceScope field is only applicable to Entity type resources (self or selfWithDescendants).
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain a user API key, a service account token, or a project API key with "Admin" privileges. A service account token cannot manage statements whose principal is a service account.
Path parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
permissionStatementId | integer | Yes | The unique ID for a specified permission. |
Request body
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
actions | string | No | The new actions. | |
effect | string | No | The new policy. | |
resourceIdentifier | string | No | The new resource identifier. Changing this requires managePermissions on both the old and new target resource. | |
resourceScope | string | No | The new resource scope. Only applicable to Entity type resources. | |
subResources | string | No | The new sub-resource policies. |
Responses
204 Successfully updated permission with specified ID. There is no return body.
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 invalid data or 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. |