API Reference
API Reference
Section titled “API Reference”This section describes the EdgeQuake HTTP API for developers who call EdgeQuake from their own code or write an SDK. The product pin is v0.33.0.
Pick a page
Section titled “Pick a page”| I want to… | Read |
|---|---|
| Learn auth, headers, errors, pagination, rate limits | REST API |
| Upload text, files or PDFs and follow progress | Document upload |
| Ask questions, stream answers, chat | REST API: Query and Chat |
| Read or edit the knowledge graph | REST API: Graph |
| Manage tasks, queue metrics, costs, tenants, workspaces | Extended API |
| Trace an answer back to chunks and documents | Lineage endpoints |
| Save provider endpoints and test them (v0.33.0) | Connections and provider test |
| Use EdgeQuake from an AI agent | MCP integration |
| Use a typed client library | SDKs |
How the API is organised
Section titled “How the API is organised”All resource routes live under /api/v1. Health probes, WebSockets, the MCP gateway and OAuth are served from the root. The Ollama emulation lives under /api.
%%{init: {"theme":"base","themeVariables":{"primaryColor":"#E0E7FF","primaryBorderColor":"#6366F1","primaryTextColor":"#1E1B4B","secondaryColor":"#D1FAE5","secondaryBorderColor":"#10B981","secondaryTextColor":"#064E3B","tertiaryColor":"#FEF3C7","tertiaryBorderColor":"#F59E0B","tertiaryTextColor":"#6B7A90","lineColor":"#7A889C","clusterBkg":"rgba(99,102,241,0.07)","clusterBorder":"#A5B4FC","noteBkgColor":"#FEF9C3","noteTextColor":"#422006","textColor":"#6B7A90","titleColor":"#6B7A90","signalColor":"#7A889C","signalTextColor":"#6B7A90","loopTextColor":"#6B7A90","edgeLabelBackground":"#F1F5F9","actorLineColor":"#94A3B8"}}}%%
%% eq-theme:v1
flowchart LR
C["Client"] --> H["Health: /health /ready /live"]
C --> V1["REST: /api/v1"]
C --> V2["Jobs: /api/v2"]
C --> WS["WebSocket: /ws"]
C --> MCP["MCP gateway: /mcp"]
C --> OL["Ollama emulation: /api"]
V1 --> D["Documents and PDFs"]
V1 --> Q["Query and Chat"]
V1 --> G["Graph and Lineage"]
V1 --> T["Tasks and Pipeline"]
V1 --> A["Tenants and Workspaces"]
V1 --> P["Models, Settings, Connections"]
V1 --> U["Auth, Users, API keys"]
%% eq-classes
classDef eqActor fill:#FCE7F3,stroke:#EC4899,color:#500724
classDef eqLlm fill:#FEF3C7,stroke:#F59E0B,color:#451A03
class C,MCP eqActor
class OL,P eqLlm
Read the diagram from left to right: a client picks a front door, and /api/v1 fans out into the resource areas listed in the table above.
What a typical integration does
Section titled “What a typical integration does”A typical client authenticates, picks a workspace, uploads a document, waits for the background task to finish, then queries.
%%{init: {"theme":"base","themeVariables":{"primaryColor":"#E0E7FF","primaryBorderColor":"#6366F1","primaryTextColor":"#1E1B4B","secondaryColor":"#D1FAE5","secondaryBorderColor":"#10B981","secondaryTextColor":"#064E3B","tertiaryColor":"#FEF3C7","tertiaryBorderColor":"#F59E0B","tertiaryTextColor":"#6B7A90","lineColor":"#7A889C","clusterBkg":"rgba(99,102,241,0.07)","clusterBorder":"#A5B4FC","noteBkgColor":"#FEF9C3","noteTextColor":"#422006","textColor":"#6B7A90","titleColor":"#6B7A90","signalColor":"#7A889C","signalTextColor":"#6B7A90","loopTextColor":"#6B7A90","edgeLabelBackground":"#F1F5F9","actorLineColor":"#94A3B8"}}}%%
%% eq-theme:v1
sequenceDiagram
participant App as Your app
participant API as EdgeQuake API
participant Q as Task queue
App->>API: POST /api/v1/auth/login
API-->>App: access_token
App->>API: POST /api/v1/documents/upload
API-->>App: 202 with task_id, track_id and document_id
API->>Q: queue the work
loop until a terminal status
App->>API: GET /api/v1/tasks/{track_id}
API-->>App: status pending, processing, indexed
end
App->>API: POST /api/v1/query
API-->>App: answer and sources
Read it top to bottom. Uploads return at once; the server does the heavy work in the background, so poll the task (or listen on a WebSocket) before you query.
Source of truth
Section titled “Source of truth”The running server publishes its own contract at /api-docs/openapi.json and a Try-it-out UI at /swagger-ui/ (default http://localhost:8080). A committed copy of the v0.33.0 contract is in openapi.snapshot.json. It includes the Connections routes. Where this documentation and the server disagree, trust the server.
Related: Ingestion cancel and fairness, Decision extraction, Environment variables.