API Stability |
Long-Term
|
The createRole() GraphQL mutation may be used to add a role. This is usable only if roles are not managed externally (e.g., handled in LDAP).
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 createRole() mutation field:
createRole(
input: AddRoleInput!
): AddRoleMutation!
Below is an example of how this mutation field might be used:
mutation {
createRole(input:
{ displayName: "sales",
viewPermissions: [ReadAccess]
} )
{ role { id } }
}
{
"data": {
"createRole": {
"role": {
"id": "pFkHHTbDSlcTo3elkos3Qd0ySW6Kduhb"
}
}
}
}
Given Datatypes
For AddRoleInput
, there
are a few parameters. Below is a list of them along with
descriptions of each:
Table: AddRoleInput
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
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 | |||||
color | string | Long-Term | The color used for highlighting role added. | ||
displayName | string | yes | Long-Term | The name to display for the role added. | |
objectAction | ObjectAction | Long-Term | The object of the action. See ObjectAction . | ||
organizationManagementPermissions | [OrganizationManagementPermission ] | yes | Long-Term | The management permissions for the organization. See OrganizationManagementPermission . | |
organizationPermissions | [OrganizationPermission ] | yes | Long-Term | The permissions for the organization. See OrganizationPermission . | |
systemPermissions | [SystemPermission ] | yes | Long-Term | The permissions for the system. See SystemPermission . | |
viewPermissions | [Permission ] | yes | Long-Term | The permissions for the view. See Permission . |
Returned Datatypes
The returned datatype
AddRoleMutation
has one
parameter, but if you click on it below you'll see that it has
several sub-parameters:
Table: AddRoleMutation