API Reference

Complete reference for the SoliDB HTTP API. All endpoints are prefixed with /_api unless otherwise noted.

Performance & Formats

SoliDB supports multiple serialization formats to optimize performance. While JSON is the default for ease of use, MessagePack is strongly recommended for production environments to reduce payload size and parsing overhead.

JSON
JSON (Default)

Human-readable, universally supported.

Accept: application/json

MP
MessagePack (Fast)

Binary format, smaller payloads, faster parsing.

Accept: application/msgpack

Quick Reference

Common Endpoints

Method Endpoint Description
POST /_api/database/:db/query Execute SDBQL query
POST /_api/document/:db/:coll Insert document
GET /_api/document/:db/:coll/:key Get document by key
PUT /_api/document/:db/:coll/:key Update document
DELETE /_api/document/:db/:coll/:key Delete document
POST /auth/login Get JWT token
GET /metrics Prometheus metrics

JWT Authentication

Login to get a token, then include it in requests:

Authorization: Bearer <token>

API Key Authentication

Alternatively, use an API key:

X-API-Key: <api_key>

Public endpoints: /auth/login, /_api/health, and /metrics do not require authentication.