role.find

The role.find command retrieves a role.

TR50 Request


                        {
  "cmd": {
    "command": "role.find",
    "params": {
      "key": "myrolekey"
    }
  }
}
      

Request Parameters

Name

Type

Required

Description

key

String

Yes

The role key.

TR50 Response

If the command is sent successfully a success message and the role object is returned. Otherwise, an error and error message will be returned.


                        {
  "cmd": {
    "success": true,
    "params": {
      "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

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.