API Stability |
Long-Term
|
The updateUser() GraphQL mutation is used to update a user in LogScale. It requires root permission.
For more information on user authorization, see the Manage users & permissions documentation page.
Syntax
Below is the syntax for the updateUser() mutation field:
graphql
updateUser(
input: AddUserInput!
): UpdateUserMutation!
Below is an example of how this mutation field might be used:
graphql
mutation {
updateUser( input:
{ username: "bob",
isRoot: true
} )
{ user { id } }
}
json
{
"data": {
"updateUser": {
"user": {
"id": "Nvu1UOjRtlByBCeKY2K1kgP1"
}
}
}
}
Given Datatypes
For AddUserInput, there are several parameters. Below is a list of them along with a description of each:
Table: AddUserInput
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 | |||||
company | string | Long-Term | The name of the company or other entity associated with the user. | ||
countryCode | string | Long-Term | The two-letter ISO 3166-1 Alpha-2 code for the country of residence (e.g., us). | ||
email | string | Long-Term | The email address for contacting the user related to the account. | ||
firstName | string | Long-Term | The first name of the user. | ||
fullName | string | Long-Term | The full name of the user. | ||
isRoot | boolean | Long-Term | Whether the user has root access. | ||
lastName | string | Long-Term | The last name or family name of the user. | ||
picture | string | Long-Term | The file name of an image file containing a picture of the user. | ||
stateCode | string | Long-Term | The two-letter, ISO 3166-2 country sub-division code for the state of residence (e.g., ny). | ||
username | string | yes | Long-Term | The name of the user. |
Returned Datatypes
The returned datatype UpdateUserMutation has one parameter and several sub-parameters. Click on the link below to see a table with the sub-parameters:
Table: UpdateUserMutation