HTTP API Reference
Use this page when integrating KalamDB over HTTP (outside SDK abstractions), building backend services, or debugging with curl/Postman.
- Base URL:
http://<host>:8080 - API version prefix:
/v1
Route map
Health and status
GET /health(localhost-only)GET /v1/api/healthcheck(localhost-only)GET /v1/api/cluster/health(localhost-only)
SQL and files
POST /v1/api/sqlGET /v1/files/{namespace}/{table_name}/{subfolder}/{file_id}
WebSocket
GET /v1/ws
Auth and session
POST /v1/api/auth/loginPOST /v1/api/auth/refreshPOST /v1/api/auth/logoutGET /v1/api/auth/mePOST /v1/api/auth/setupGET /v1/api/auth/status
Topic HTTP API
POST /v1/api/topics/consumePOST /v1/api/topics/ack
Authentication rules by endpoint
Bearer token required
Authorization: Bearer <JWT_TOKEN>POST /v1/api/sqlGET /v1/files/...POST /v1/api/topics/consumePOST /v1/api/topics/ack
Cookie or bearer
POST /v1/api/auth/refreshGET /v1/api/auth/me
Public (no auth)
POST /v1/api/auth/loginPOST /v1/api/auth/logoutPOST /v1/api/auth/setup(localhost-only unless remote setup enabled)GET /v1/api/auth/status(localhost-only unless remote setup enabled)GET /health(localhost-only)GET /v1/api/healthcheck(localhost-only)GET /v1/api/cluster/health(localhost-only)
WebSocket auth flow
GET /v1/ws upgrades unauthenticated, then authenticate in-band:
{"type":"authenticate","method":"jwt","token":"..."}See WebSocket Protocol.
SQL API
POST /v1/api/sql
Execute SQL using JSON or multipart payload.
Headers
Authorization: Bearer <JWT_TOKEN>(required)Content-Type: application/jsonormultipart/form-data
JSON request body
{
"sql": "SELECT * FROM default.users WHERE id = $1",
"params": [123],
"namespace_id": "default"
}Multipart request body (FILE columns)
Expected parts:
sql(required)params(optional JSON array string)namespace_id(optional)file:<placeholder>file parts
SQL placeholder mapping:
- SQL uses
FILE("name")orFILE('name') - Multipart part name must be
file:name
File download API
GET /v1/files/{namespace}/{table_name}/{subfolder}/{file_id}
- Bearer token required
- Optional
user_idquery for user-table scopes 200returns binary content, otherwise400/403/404based on validation/permission/not found
Topic HTTP API
For detailed consume/ack payload examples, see Topic Pub/Sub HTTP API.
Last updated on