PUT ./roles
Used to update a role.
The fields ar the same as in POST ./roles with the exception that roleUaTip cannot be changed.
If rolePermissions is omitted then the permissions assigned remain the same. If it's present the permission will be overwritten with those in PUT.
PUT parameters
Name | Value Type | Validation | Details |
---|---|---|---|
roleName | string | Required | min_length[2],max_length[50]; Role name. |
roleIsAdministrative | int | Optional | values[0,1]; Sets if roles is an administrative role. |
roleIsImplicit | int | Optional | values[0,1]; Sets if the role is implicit for the specified uaTip. Only applies to uaTip = 2,3 |
roleVisibleInTitle | int | Optional | values[0,1]; Sets if the role is visible in user title. |
rolePermissions[] | [int] | Optional | Array of permission ID's. |
roleIsImplicitAst[] | [int] | Optional | Array of astID's that this role is implicit. Cand be sent empty to remove all implicit astID's. |
Validation
Error Field | Error Code | Error Message |
---|---|---|
rolePermissions[] | 101 | At least one permission has an invalid ID. |
rolePermissions[] | 102 | At least one permission is not available for the specified uaTip. |
roleName | 103 | Role not found. |
rolePermissions[] | 104 | Implicit role ast is not available for the specified uaTip. |
rolePermissions[] | 105 | At least one astIDis invalid. |
Output example
{"result": true}