API Stability Long-Term

The updateRole() GraphQL mutation is used to update a user role in LogScale.

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

graphql
updateRole(
     input: UpdateRoleInput!
   ): UpdateRoleMutation!

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

Show:
graphql
mutation {
  updateRole( input:
    { roleId: "oM04QwJ9N3FDHdzqOyboxvjYSwQsXzA2",
      displayName: "Testers",
      viewPermissions: [ ChangeDashboards, ReadAccess ]
    }
  )
  { role { usersCount } }
}
Example Responses
Show:
json
{
  "data": {
    "updateRole": {
      "role": {
        "usersCount": 6
      }
    }
  }
}

Given Datatypes

UpdateRoleInput has several parameters. Below is a list of them along with a description of each:

Table: UpdateRoleInput

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: Oct 4, 2024
colorstring  Long-TermThe color for displaying the role.
descriptionstring  Long-TermThe description of the role to update.
displayNamestringyes Long-TermThe display name of the role to update.
objectActionObjectAction  Long-TermThe object of the action. See ObjectAction.
organizationManagementPermissions[OrganizationManagementPermission]yes Long-TermList of permissions given for organization management. See OrganizationManagementPermission.
organizationPermissions[OrganizationPermission]yes Long-TermList of permissions given for the organization. See OrganizationPermission.
roleIdstringyes Long-TermThe unique identifier of the role to update.
systemPermissions[SystemPermission]yes Long-TermList of permissions given for users who are assigned the role. See SystemPermission.
viewPermissions[Permission]yes Long-TermA list of permissions associated with the view. See Permission.

Returned Datatypes

The returned datatype UpdateRoleMutation has one parameter and several sub-parameters. Click on the link below to see a table containing the sub-parameters:

Table: UpdateRoleMutation

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: Oct 4, 2024
roleRoleyes Long-TermThe role to update. See Role.