Kaiten
API Reference

GraphQL

GraphQL API schema overview and usage.

GraphQL API

Kaiten exposes a GraphQL API primarily used by the React dashboard for optimized data fetching.

Endpoint

POST /api/graphql

When to Use

The GraphQL API is designed for dashboard-style queries where you need to fetch related data in a single request. For programmatic integrations, the REST API is recommended.

Example Query

query {
  customers {
    items {
      id
      name
      slug
      instances {
        id
        name
        license {
          name
          type
        }
      }
    }
  }
}

Authentication

GraphQL requests require the same authentication as REST:

  • Authorization: Bearer <jwt> (human)
  • Authorization: Bearer ksh_xxx (machine)

Schema Generation

The GraphQL schema is generated from Go code using gqlgen. The schema is defined in api/internal/graphql/schema/ and resolvers are generated in api/internal/graphql/gen/.

Limitations

  • Mutations are limited — most write operations should use the REST API
  • No subscriptions — use webhooks for real-time updates
  • The GraphQL API may have fewer features than REST for certain modules

On this page