GraphQL API

LogScale uses both REST and GraphQL APIs for data-driven tasks, with GraphQL in use for management and administration tasks, and REST for interfaces not supported by GraphQL.

GraphQL handles tasks like user and permissions management, cluster control, and so on. GraphQL lets you specify exactly the data you need, using a single endpoint.

The GraphQL API is organized into three reference manuals:

  • GraphQL Queries

    GraphQL queries return configurations, settings, and other administrative data from LogScale.

  • GraphQL Mutations

    Mutations create, modify, or delete data in LogScale. Some also return the updated data as confirmation.

  • GraphQL Datatypes

    Datatypes define the structures used as inputs and return values throughout the API.

The GraphQL API is backwards compatible. Existing scripts should not fail after an upgrade.

Each query, mutation, and field has a stability level that indicates how long it will remain unchanged. Before building a production integration, review API Stability for stability level definitions.

You can test GraphQL queries and mutations in several ways:

  • Use the API explorer (see API Explorer).

  • Write scripts in languages like Node.js, Perl, or Python using an HTTP or GraphQL client library.

  • Use command-line tools like curl (see Scripts and curl).

For more on using REST APIs with LogScale, see Search API.

To find queries and mutations organized by function rather than alphabetically, see Query and Mutation Groups.