API Stability Long-Term

The assignSystemRoleToGroup() GraphQL mutation may be used to assign a system role to a group.

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 assignSystemRoleToGroup() mutation field:

graphql
assignSystemRoleToGroup(
      input: AssignSystemRoleToGroupInput!
   ): AssignSystemRoleToGroupMutation!

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

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

Given Datatypes

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

Table: AssignSystemRoleToGroupInput

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.
roleIdstringyes Long-TermThe unique identifier of the role being assigned.

Returned Datatypes

AssignSystemRoleToGroupMutation Below is a has one parameter, with several sub-parameters:

Table: AssignSystemRoleToGroupMutation

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
groupGroupSystemRoleyes Long-TermThe group for which to assign system role. See GroupSystemRole.