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.

Syntax

Below is the syntax for the accounts query field:

accounts: [Account!]!
Examples

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)" \
  http://127.0.0.1:8080/graphql \
  -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.