The changeUserAndGroupRolesForSearchDomain() GraphQL mutation field is used to change the user and group roles for a search domain.

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

Syntax

Below is the syntax for the changeUserAndGroupRolesForSearchDomain() mutation field:

graphql
changeUserAndGroupRolesForSearchDomain(
      searchDomainId: string!
      groups: [GroupRoleAssignment!]!
      users: [UserRoleAssignment!]!
   ): [UserOrGroup!]!

Given Datatypes

For the input (i.e., GroupRoleAssignment), there are several parameters that may be given. Below is a list of them along with their datatypes and a description of each:

Table: GroupRoleAssignment

ParameterTypeRequired[a]DefaultDescription
groupIdstringyes The unique identifier for the group related to the role.
roleIdstringyes The unique identifier of the role.

[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.


Another special given parameter is the UserRoleAssignment data type. Below is a list of parameters for it, along with their datatypes and a description of each:

Table: UserRoleAssignment

ParameterTypeRequired[a]DefaultDescription
groupIdstringyes The unique identifier of the group associated with the role.
roleIdstringyes The unique identifier for the role to assign.

[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.


Returned Datatypes

The returned results are sets of users and groups. This is a union between two other datatypes: group() and user(). The parameters for those are listed in the tables below:

Table: Group

ParameterTypeRequired[a]DefaultDescription
idstringyes The identifier of the group.
displayNamestringyes The display name of the group.
colorstring  The display color associated with the group.
descriptionRole  The role associated with the group (see Role Table).
viewPermissionsstring  Any view permissions assigned to the group.
searchDomainCountintegeryes The number of search domains for the group.
roles[SearchDomainRole]yes The roles for the group (see SearchDomainRole Table).
searchDomainRoles(searchDomainId: string): [SearchDomainRole]yes The search domain roles assigned to the group (see SearchDomainRole Table).
searchDomainRolesByName(searchDomainName: string!): SearchDomainRoleyes The search domain roles assigned to the group, by name. The searchDomainName is a string value, not a complex datatype (see SearchDomainRole Table).
systemRoles[GroupSystemRole]yes The system roles of the group (see GroupSystemRole Table).
organizationRoles[GroupOrganizationRole]yes The roles of the organization associated with the group (see GroupOrganizationRole Table).
queryPrefixes[QueryPrefixes]yes The query prefixes for the group (see QueryPrefixes Table).
userCountintegeryes The number of users that are part of the group.
users[User]yes The list of users in the group (see User 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.


Table: User

ParameterTypeRequired[a]DefaultDescription
idstringyes The identifier or token for the user.
displayNamestringyes The value of the fullName if used, otherwise the username.
usernamestringyes The user name for the account.
isRootbooleanyes Whether the user account is granted root access.
isOrgRootbooleanyes Whether the organization is granted root access.
fullNamestring  The user's full name (e.g., Bob Smith). Don't use if using other name parameters.
firstNamestring  The user's actual first name (e.g., Bob). Don't use with fullName.
lastNamestring  The user's actual last name or family name (e.g., Smith). Don't use with fullName.
phoneNumberstring  The telephone number for LogScale to use for telephone text messages.
emailstring  The user account's email address for communications from LogScale.
picturestring  File name of an image file for the account.
createdAtdatetimeyes The data and time the account was created.
countryCodestring  The two-letter ISO 3166-1 Alpha-2 code for the country of residence (e.g., us).
stateCodestring  The two-letter, ISO 3166-2 country sub-division code for the state of residence (e.g., ny).
companystring  The name of the company for the user account.
userOrGroupSearchDomainRolessearch: string, skip: Int = 0, limit: Int = 50): UserOrGroupSearchDomainRoleResultSet!yes The number of results to skip or the offset to use. For instance, if implementing pagination, set skip = limit * (page - 1). See UserOrGroupSearchDomainRoleResultSet Table.
groupSearchDomainRolesGroupSearchDomainRoleyes The group search domain roles for the user (see GroupSearchDomainRole Table).
searchDomainRoles[SearchDomainRole]  The search domain roles assigned to the user (see SearchDomainRole Table).
searchDomainRolesByNamestringyes The search domain roles for the user, by name.
group[Group]yes The groups of which the user is a member (see Group Table).
permissionstypeyes Permissions of the user.
permissionsPagetypeyes PREVIEW: A page of user permissions.
allowedSystemActions[SystemAction]yes Returns the actions the user is allowed to perform in the system. See SystemAction Table.
allowedOrganizationActions[OrganizationAction]yes Returns the actions the user is allowed to perform in the organization (see OrganizationAction 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.