POST/api/auth/register
Register a new user profile and allocate an isolated sandbox database.
{
"email": "user@example.com",
"password": "yourpassword",
"domains": ["http://localhost:5173"]
}
A fast, secure, C++ API Gateway for hosting user-isolated SQLite databases.
Version: v1.1.0
Manage user registration, authentication keys, and connection profile constraints.
Register a new user profile and allocate an isolated sandbox database.
{
"email": "user@example.com",
"password": "yourpassword",
"domains": ["http://localhost:5173"]
}
Authenticate credentials and fetch session metadata along with your active API key.
{
"email": "user@example.com",
"password": "yourpassword"
}
Change your account password. Requires verification of your active old password.
{
"oldPassword": "oldpassword123",
"newPassword": "newsecurepassword123"
}
Configure whitelisted CORS domains dynamically.
{
"domains": [
"https://my-domain.com",
"http://localhost:5173"
]
}
Modify your account timezone offset or city code dynamically to configure datetime logging.
{
"timezone": "Asia/Bangkok"
}
Fetch details about your registered user profile including User ID, Email, Whitelisted Domains, Timezone and active API Key.
Revokes your active API Key and returns a newly generated secure token immediately.
Deletes your account completely, purging your system metadata and deleting your isolated SQLite database directory recursively from the host disk.
{
"password": "yourpassword123"
}
All schema routes require bearer API token authorization via header: Authorization: Bearer sk_your_api_key
Provisions a new table structure. System automatically prepends id (primary key) and appends created and updated timestamps.
{
"table": "contacts",
"columns": [
{ "name": "name", "type": "TEXT NOT NULL" },
{ "name": "phone", "type": "TEXT" }
]
}
Provisions multiple table schemas atomically inside a single transaction. Excellent for setting up tables with relational foreign key structures in migrations.
{
"tables": [
{
"table": "projects",
"columns": [
{ "name": "title", "type": "TEXT NOT NULL" }
]
},
{
"table": "tasks",
"columns": [
{ "name": "description", "type": "TEXT NOT NULL" },
{ "name": "project_id", "type": "TEXT REFERENCES projects(id) ON DELETE CASCADE" }
]
}
]
}
Creates a custom B-Tree search index on columns to optimize dynamic lookups.
{
"index": "idx_contacts_name",
"table": "contacts",
"columns": ["name"],
"unique": false
}
Provisions multiple table search indices atomically inside a single transaction. Great for indexing schemas in batch migrations.
{
"indexes": [
{
"index": "idx_contacts_name",
"table": "contacts",
"columns": ["name"],
"unique": false
},
{
"index": "idx_projects_title",
"table": "projects",
"columns": ["title"],
"unique": true
}
]
}
Registers an event trigger in SQLite for automated reactive auditing.
{
"trigger": "tg_contacts_delete_log",
"event": "DELETE",
"table": "contacts",
"actionTable": "audit_logs",
"actionData": {
"task_id": "OLD.id",
"action": "DELETED"
}
}
All CRUD routes require bearer API token authorization via header: Authorization: Bearer sk_your_api_key
Inserts a row into your table. Auto-injects a cryptographically secure 15-character ID. Supports an optional conflictTarget parameter to execute high-speed, native SQLite single-row UPSERTs.
{
"table": "contacts",
"conflictTarget": "name",
"data": {
"name": "Jane Doe",
"phone": "+1-555-0199"
}
}
Inserts multiple rows of data atomically inside a single transaction. Supports an optional conflictTarget parameter to execute high-speed, native SQLite UPSERTs (insert-or-update on conflicts).
{
"table": "contacts",
"conflictTarget": "name",
"rows": [
{ "name": "Jane Doe", "phone": "+1-555-0199" },
{ "name": "Alan Turing", "phone": "+1-555-1954" }
]
}
Queries database records with clean filters.
{
"table": "contacts",
"select": ["id", "name", "phone"],
"where": {
"name": "Jane Doe"
},
"limit": 5
}
Retrieves a list of all user-created tables in your sandboxed database along with their active row counts.
Retrieves a list of all active search indexes currently provisioned on your custom database tables.
Retrieves a list of all active event triggers configured on your tables.
Retrieves a complete analytical metrics payload representing your database size (formatted in a human-readable string like 5.4MB), tables list (with active row counts), indexes, and triggers.
Truncates all rows in a table. Supports an optional foreignKeyCheck parameter (0 or 1) to temporarily toggle foreign key verification constraints during the operation.
{
"table": "contacts",
"foreignKeyCheck": 0
}
Updates records matching criteria. The system automatically maintains local timezone update tracking.
{
"table": "contacts",
"data": { "phone": "+1-555-9876" },
"where": { "id": "yR5LBZgxfcxN086" }
}
Deletes records matching criteria.
{
"table": "contacts",
"where": { "id": "yR5LBZgxfcxN086" }
}
Alters a database table (rename table, rename column, or modify column type) using transaction-backed temporary schema recreations.
{
"table": "contacts",
"action": "modify_column",
"column": "email",
"type": "TEXT NOT NULL UNIQUE"
}
Deletes (drops) a database table. Supports temporarily bypassing foreign key checks.
{
"table": "contacts",
"foreignKeyCheck": 0
}
System metrics and availability check. Unauthenticated and ready for monitoring pages.
Returns high-level system availability health metrics and process uptime statistics.
{
"status": "healthy",
"uptime_seconds": 128450,
"uptime_human": "1d 11h 40m 50s",
"version": "1.1.0",
"gateway": "C++ SQLite Gateway"
}
Returns the client's public IP address. Handles reverse-proxy chains (e.g. Nginx, Cloudflare) automatically.
{
"ip": "180.244.135.210"
}