Sections
Getting started
CLI flags & config
SQL
DDLDMLSELECTFunctions & expressionsTransactions
Clients
HTTP APINative driversPostgreSQL / MySQL wire protocolBinary RPC
Features
RBAC (multi-user)Embeddings (semantic search)File importBackupsDemo showcase mode and .fdb management
Operations
DeploymentArchitectureFileDB on Windows: tray and autostart
Reference
FileDB vs PostgreSQL / MySQL
AI
AI Features: overviewAI Chat and AI AgentSmart Export and AI Import MappingEmbeddings and Hybrid SearchAI setup: providers and presets
Dashboards
Dashboards: overviewDatasets and chartsNo-Code query builderDashboards AI assistantWidgets, grid and filtersPublic links and exportLayout, text cards and KPI comparison

HTTP API

The basic cycle: login → opendb → query

TOKEN=$(curl -s -X POST http://localhost:8080/api/auth/login 
  -H "Content-Type: application/json" 
  -d '{"password":"mypass"}' | jq -r .data.token)

curl -X POST http://localhost:8080/api/createdb 
  -H "X-Token: $TOKEN" --data-urlencode "name=blog"

curl -X POST http://localhost:8080/api/opendb 
  -H "X-Token: $TOKEN" --data-urlencode "name=blog"

curl -X POST http://localhost:8080/api/query 
  -H "X-Token: $TOKEN" 
  -H "Content-Type: application/json" 
  -d '{"sql":"CREATE TABLE posts (id INT AUTO_INCREMENT PRIMARY KEY, title TEXT, body TEXT)"}'

/api/opendb creates the .fdb file if it doesn't exist yet — calling /api/createdb separately for an existing database isn't required.

PostgreSQL/MySQL dialects over HTTP

The same dialect translator used by the wire protocol is also available over HTTP — handy when you're already on HTTP but writing SQL in PG/MySQL syntax:

-- PG-style:
INSERT INTO users (name) VALUES ($1) RETURNING id;
INSERT INTO users (id, name) VALUES (1, 'Alice') ON CONFLICT (id) DO UPDATE SET name = EXCLUDED.name;

-- MySQL-style:
INSERT INTO users (name) VALUES (?);
INSERT INTO users (id, name) VALUES (1, 'Alice') ON DUPLICATE KEY UPDATE name = VALUES(name);
INSERT IGNORE INTO users ...
REPLACE INTO users ...

Pass the flavor via the JSON body, ?flavor=mysql in the URL, or an X-SQL-Flavor: mysql header.

Metrics

GET /api/metrics (JSON) and GET /metrics (Prometheus format): filedb_open_databases, filedb_active_sessions, filedb_select_total/_insert_total/_update_total/_delete_total, filedb_auth_attempts_total/_auth_success_total, filedb_table_rows{database, table}.

Related pages
← Previous
Transactions
Next →
Native drivers