GraphQL API
LogScale 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 LogScale.
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 LogScale 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 LogScale GraphQL, you can use LogScale's API Explorer.
The GraphQL API is available in the GraphQL manual:
API Explorer
LogScale 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:
https://$YOUR_LOGSCALE_URL/docs/api-explorer
You would replace $YOUR_LOGSCALE_URL
with the URL for
your LogScale instance. For a more practical example, if you want to
access a LogScale cloud account using the API Explorer, you would enter
this:
https://cloud.humio.com/docs/api-explorer
Notice that the URL does not include a repository name. That's because the LogScale API is for accessing and changing settings on the LogScale installation, not repository data. For that, use the Search API and other APIs listed in the margins.