The removeUser() GraphQL mutation may be used to remove a user from LogScale.

For more information on user authorization, see the Managing Users & Permissions documentation page.

Syntax

Below is the syntax for the removeUser() mutation field:

graphql
removeUser(
      input: RemoveUserInput!
   ): RemoveUserMutation!

Given Datatypes

The given datatype RemoveUserInput has its own parameters. Below is a list of them along with their datatypes and a description of each:

Table: RemoveUserInput

ParameterTypeRequired[a]DefaultDescription
usernamestringyes The name of the user to remove.

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.


Returned Datatypes

The returned datatype RemoveUserMutation has its own parameters. Below is a list of them along with their datatypes and a description of each:

Table: RemoveUserMutation

ParameterTypeRequired[a]DefaultDescription
userUseryes The user to remove from the mutation (see User Table).

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.


Examples

Below is an example using the removeUser() mutation field from the command-line as part of a curl command, on a self-cloud LogScale server:

curl -v -XPOST -H "Content-Type: application/json" \
  -H "Authorization: bearer $(cat /data/humio-data/local-admin-token.txt)" \
  http://127.0.0.1:8080/graphql \
  -d '{ "query": "mutation { removeUser(input: { username: \"user@example.com\" }) { user { id } } }" }'

In this example, the removeUser() mutation field is used to remove a user from LogScale. You can also run this command with a public LogScale hostname using a user API token.