API Stability Long-Term

The assignRoleToGroup() GraphQL mutation assigns a role to a group for a given view.

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

Syntax

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

graphql
assignRoleToGroup(
      input: AssignRoleToGroupInput!
   ): AssignRoleToGroupMutation!

Below is an example of how this mutation field might be used:

Show:
graphql
mutation {
  assignRoleToGroup(input: 
          { viewId: "aK9GKAsTnMXfRxT8Fpecx3fX",
            groupId: "Kj3SzghhYxdjz8X6XIxZ2EhaVTrMuSpo", 
            roleId: "pFLOxe7C8zkNbWOSP8VartJ0I6Kz0eK2"} )
     { group { role {id, displayName, viewPermissions} } }
}
Example Responses
Show:
json
{
  "data": {
    "assignRoleToGroup": {
      "group": {
        "role": {
          "id": "pFLOxe7C8zkNbWOSP8VartJ0I6Kz0eK2",
          "displayName": "Member",
          "viewPermissions": [
            "ChangeDashboards",
            "ChangeSavedQueries",
            "ChangeTriggers",
            "ChangeFiles",
            "ChangeParsers",
            "ReadAccess"
          ]
        }
      }
    }
  }
}

Given Datatypes

For AssignRoleToGroupInput, there are a few parameters that may be given. Below is a list of them along with a description of each:

Table: AssignRoleToGroupInput

ParameterTypeRequiredDefaultStabilityDescription
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.
Table last updated: Sep 17, 2024
groupIdstringyes Long-TermThe unique identifier of the group being assigned.
overrideExistingAssignmentsForViewboolean  Long-TermWhether to override any existing assignments for a view.
roleIdstringyes Long-TermThe unique identifier of the role being assigned.
viewIdstringyes Long-TermName of the view of the alert.

Returned Datatypes

AssignRoleToGroupMutation has one parameter, with some sub-parameters:

Table: AssignRoleToGroupMutation

ParameterTypeRequiredDefaultStabilityDescription
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.
Table last updated: Sep 23, 2024
groupSearchDomainRoleyes Long-TermThe group for which to assign role. See SearchDomainRole.