accounts( )

The accounts GraphQL query field is used to list user accounts in Humio. It requires root access. The root user will not have access to any credentials from the accounts.

For information on user authorization, see the Authorization documentation page.


Below is the syntax for the accounts query field:

accounts: [Account!]!

Below is an example using the accounts query field from the command-line as part of a curl command, on a self-hosted Humio server:

curl -v -XPOST -H "Content-Type: application/json" \
  -H "Authorization: bearer $(cat /data/humio-data/local-admin-token.txt)" \ \
  -d '{ "query": "{ accounts { username } }" }'

In this example, the accounts query field is used to get a list of users from Humio. You can also run this command with a public Humio hostname using a user API token.