role.list
The role.list command lists roles associated with the session's organization.
Requires Org-Admin rights.
TR50 Request
{
"cmd": {
"command": "role.list",
"params": {
"offset": 0,
"limit": 10,
"orgId": "SYSTEM"
}
}
}
Request Parameters
Name |
Type |
Required |
Description |
---|---|---|---|
offset |
Integer |
|
The starting list offset, used for pagination. Defaults to 0 if not specified. |
limit |
Integer |
|
Limits the number of results returned. Defaults to the maximum configured size. |
orgId |
String |
|
Requires Super-Ops. Used to retrieve roles for an organization other than the current session. |
TR50 Response
If the command is sent successfully a success message and the array of role objects is returned. Otherwise, an error and error message will be returned.
{
"cmd": {
"success": true,
"params": {
"result": [
{
"id": "52ebe563758a5c90e048865d",
"key": "myrolekey",
"orgId": "53fcf90e048865d563758a5c",
"name": "My Role",
"desc": "The description for my role",
"perms": ["thing", "property", "thing_def.list", "thing_def.find"],
"viewTags": ["tag1", "tag2"],
"updateTags": ["tag1"],
"createdBy": "SYSTEM",
"createdOn": "2014-01-31T13:03:15.31-05:00",
"updatedBy": "admin@example.com",
"updatedOn": "2014-02-03T14:04:16.32-05:00"
},
...
]
}
}
}
Response Parameters
Name |
Type |
Description |
---|---|---|
result |
Array |
An array of role objects. |
Result Role Parameters
Name |
Type |
Description |
---|---|---|
id |
String |
The object id of the role. |
key |
String |
The key. |
orgId |
String |
The organization object id that this role belongs to. |
name |
String |
The name of the role. |
desc |
String |
The description. |
perms |
Array |
The 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. |
readOnly |
Bool |
If this role and it's permissions cannot be modifed. |
createdBy |
String |
The email address of the user who created the role. |
createdOn |
String |
The timestamp that the role was created. |
updatedBy |
String |
The email address of the user who last updated the role. |
updatedOn |
String |
The timestamp that the role was updated. |