Base path: /api/v1
Creates a user and returns access and refresh tokens.
Example body:
{
"email": "admin@example.com",
"password": "StrongPassword123!"
}Authenticates a user and returns a session.
Rotates the session using a refresh token.
Revokes the refresh token session.
Returns the authenticated user.
Lists accessible projects.
Creates a new project.
Gets a single project.
Lists databases.
Creates a managed database record.
Body fields:
projectIdnametype(sqlite,libsql,remote)urloptional for remote databasestokenoptionalsubdomainoptional
Imports an existing SQLite file from a server-side path.
Returns a single database record.
Rotates the stored token.
Tests the registered connection.
Returns tables, columns and foreign keys.
Executes a query against the target database.
Request body:
{
"sql": "SELECT * FROM users LIMIT 10",
"params": []
}Responses:
200 OK: Successful query execution.400 Bad Request: Missingsqlparameter.404 Not Found: Database not found.422 Unprocessable Entity: SQL syntax error, constraint violation, or non-existent table/column.503 Service Unavailable: Database is currently locked (SQLITE_BUSY).500 Internal Server Error: Generic execution failure or corrupted database (SQLITE_CORRUPT).
Lists migration history for a database.
Applies SQL migrations directly to a database.
Request body:
{
"name": "add-users-table",
"sql": "CREATE TABLE users (id TEXT PRIMARY KEY, email TEXT NOT NULL);"
}Notes on Migrations:
- Migrations run inside a transaction (
BEGIN...COMMIT/ROLLBACK) for atomicity. - SQL syntax supports string literals with internal semicolons without breaking splitting logic.
Responses:
201 Created: Migration successfully applied.400 Bad Request: Missing name or SQL statements, or invalid name formatting.422 Unprocessable Entity: SQL syntax errors or constraints failing during migration execution.404 Not Found: Database not found.
Creates a new SQLite database file and registers it.
Registers a libsql database by URL and token.
Scans a mounted directory for .db files and registers them.
Scans and adopts mounted .db files into the managed storage tree.
Lists audit records.
Returns service health.
Returns readiness status.