role.update
The role.update command updates a role.
Requires Org-Admin rights.
TR50 Request
{
"cmd": {
"command": "role.update",
"params": {
"key": "myrolekey",
"name": "My New Role",
"desc": "The description for the new role",
"perms": ["thing", "property", "thing_def.list", "thing_def.find"],
"viewTags": ["tag1", "tag2"],
"updateTags": ["tag1"]
}
}
}
Request Parameters
If the field does not change, do not include it in the params object.
Name |
Type |
Required |
Description |
---|---|---|---|
key |
String |
Yes |
The key of the role. |
name |
String |
|
The name of the role. |
desc |
String |
|
The description. |
perms |
Array |
|
An array structure containing services and service methods that the role can execute. |
viewTags |
Array |
|
The security tags for things that the user can only view. |
updateTags |
Array |
|
The security tags for things that the user can update. |
TR50 Response
If the command is sent successfully a success message is returned. Otherwise, an error and error message will be returned.
{
"cmd": {
"success": true
}
}