Humio uses GraphQL for its main API because it offers significantly more flexibility. GraphQL allows you to specify precisely the data you require, which allows you to call a single endpoint to get what you need. This makes it easier to develop integrations and clients for Humio.

Updates and changes to the GraphQL API are backwards compatible with previous versions. Changes shouldn't cause existing scripts using the API to fail after an upgrade.

Some resources in Humio must be accessed with REST. This may be due to the historical nature of the interface, or because REST is better suited for our Querying API. For example, HTTP streaming is more appropriate for our streaming results, though we may add support for GraphQL Subscriptions in the future.

You don't need any special tools to use GraphQL. GraphQL is based on HTTP. All you need is curl to send requests; responses are returned as JSON. However, if you prefer a graphical user interface, which can be helpful when first learning to use Humio GraphQL, you can use Humio's API Explorer.

The GraphQL API is available in the GraphQL manual:

API Explorer

Humio has a built-in, interactive API explorer bundled with each installation. You can open the API explorer using a URL similar to the following in your browser:


You would replace $YOUR_HUMIO_URL with the URL for your Humio instance. For a more practical example, if you want to access a Humio cloud account using the API Explorer, you would enter this:

Notice that the URL does not include a repository name. That's because the Humio API is for accessing and changing settings on the Humio installation, not repository data. For that, use the Search API and other APIs listed in the margins.