Skip to content

The REST API

Every capability in Sondar is reachable over a REST API — the same surface the web UI and the CLI use. This page is the entry point; the full endpoint reference is the OpenAPI spec served by the platform itself.

  • Base URLhttp://<host>:<port>/api/v1/… (the platform’s HTTP port).
  • Authentication — there are two schemes, and they are not interchangeable:
    • The JSON API is session-based. POST /api/v1/account/login returns an X-Csrf-Token; send that back as a header on every subsequent call, along with the session cookie the login set. Without it the server answers 403 AccessForbidden — Check Csrf Token failed (CsrfTokenFilter), including on reads. Measured 22 Aug 2026 against a running instance.
    • A collect token authenticates data going IN. Generate one under Configure → Access Control → Collect Tokens and send it as an Authorization header on the ingest and trace endpoints (DCTokenService.validateForIngest, TraceGateway). It is what agents and OTLP clients use; it does not authorize the JSON API.

The full API is documented as OpenAPI/Swagger, served by the platform at /api/v1/admin/swagger. Use it to browse every endpoint, its parameters and its response shape — the catalog runs to hundreds of endpoints across search, collection, metrics, alerts, dashboards, and administration.

For scripting, the CLI wraps the most common operations — search, write, and resource management — without you having to construct requests by hand. See The Sondar CLI.