API Stability Long-Term

The assignOrganizationRoleToGroup() GraphQL mutation field is used to assign an organization 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 assignOrganizationRoleToGroup() mutation field:

graphql
assignOrganizationRoleToGroup(
       input: AssignOrganizationRoleToGroupInput!
    ): AssignOrganizationRoleToGroupMutation!

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

Show:
graphql
mutation {
  assignOrganizationRoleToGroup(input: 
            {groupId: "0dVscp645a6lCbe1WuJxjPbRRF5uBMD5", 
             roleId: "wZ5KEIUY7kRFYDxlQZCHB72VZnFGsmIB"} )
       { group { role {id, displayName, organizationPermissions} } }
}
Example Responses
Show:
json
{
  "data": {
    "assignOrganizationRoleToGroup": {
      "group": {
        "role": {
          "id": "wZ5KEIUY7kRFYDxlQZCHB72VZnFGsmIB",
          "displayName": "Maintainer",
          "organizationPermissions": [
            "ChangeSecurityPolicies",
            "ManageUsers",
            "ChangeOrganizationPermissions",
            "ChangeSessions",
            "ChangeAllViewOrRepositoryPermissions"
          ]
        }
      }
    }
  }
}

Given Datatypes

For AssignOrganizationRoleToGroupInput, there are a couple of parameters that may be given. Below is a list of them along with their data type and a description of each:

Table: AssignOrganizationRoleToGroupInput

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
groupId[string]yes Long-TermThe unique identifier of the group.
roleIdstring  Long-TermThe unique identifier of the role.

Returned Datatypes

AssignOrganizationRoleToGroupMutation has one parameter and several sub-parameters. Below is the parameter with a link to the sub-parameters:

Table: AssignOrganizationRoleToGroupMutation

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
groupGroupOrganizationRoleyes Long-TermThe group to which to assign orgnization role. See GroupOrganizationRole.