The REST API
The REST API
Section titled “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 URL and authentication
Section titled “Base URL and authentication”- Base URL —
http://<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/loginreturns anX-Csrf-Token; send that back as a header on every subsequent call, along with the session cookie the login set. Without it the server answers403 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
Authorizationheader 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 JSON API is session-based.
The reference
Section titled “The reference”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.
Automation
Section titled “Automation”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.
Related
Section titled “Related”- Building apps and using the SDKs — extending the platform itself (custom APIs, operators, storage).
- Search — the query language behind the search API.