The roles() GraphQL query will retrieve a list of all of the defined roles.

For more information on roles in LogScale, see the Manage users & permissions documentation page. You may also want to look at the Manage users & permissions page for related information.

Syntax

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

graphql
roles: [Role!]!

Given Datatypes

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

Table: Role

ParameterTypeRequiredDefaultDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
colorstring  The color associated with the role.
descriptionstring  A description of the role.
displayNamestringyes The display name of the role.
groupsGroupyes The groups related to the role. See Group.
groupsV2multipleyes The groups related to the role. The multiple datatype consists of (search: string, userId: string, searchInRoles: boolean, onlyIncludeGroupsWithRestrictiveQueryPrefix: boolean, limit: integer, skip: integer): GroupResultSetType. See GroupResultSetType.
idstringyes The unique identifier for the role.
organizationPermissionsOrganizationPermissionyes The organization permissions given to the role. See OrganizationPermission.
groupsCountintegeryes The number of groups related to the role.
systemPermissionsSystemPermissionyes The system permissions given to the role. See SystemPermission.
users[User]yes A list of users assigned the role. See User.
usersCountintegeryes The number of users assigned the role.
viewPermissionsPermissionyes The view permissions given to the role. See Permission.