The role() GraphQL query is used to retrieve a given role by it's identifier.

For more information on roles in LogScale, see the Managing Users & Permissions documentation page. You may also want to look at the Managing Users & Permissions page for related information.


Below is the syntax for the role() query field:

      roleId: string!
   ): Role!

Returned Datatypes

The returned datatype role() has its own parameters. Below is a list of them along with their datatypes and a description of each:

Table: Role

idstringyes The unique identifier for the role.
displayNamestringyes The display name of the role.
colorstring  The color associated with the role.
descriptionstring  A description of the role.
viewPermissionsPermissionyes The view permissions given to the role (see Permission Table).
systemPermissionsSystemPermissionyes The system permissions given to the role (see SystemPermission Table).
organizationPermissionsOrganizationPermissionyes The organization permissions given to the role (see OrganizationPermission Table).
groupsCountintegeryes The number of groups related to the role.
usersCountintegeryes The number of users assigned the role.
users[User]yes A list of users assigned the role (see User Table).
groupsGroupyes The groups related to the role (see Group Table).

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.