{"status":"online","name":"Database Gateway API","auth":{"type":"Bearer Token","header":"Authorization: Bearer <token>","alternateHeader":"x-api-key: <token>","description":"Each database requires its unique UUID and matching Token defined in the system registry."},"routes":{"unified":{"description":"Unified database access layer supporting both Cloudflare D1 and PostgreSQL","endpoints":{"info":{"method":"GET","path":"/db/:uuid","description":"Get database overview and available endpoint routes"},"tables":{"method":"GET","path":"/db/:uuid/tables","description":"List all tables in the database"},"cols":{"method":"GET","path":"/db/:uuid/table/:name/cols","description":"Retrieve column definitions (name, type, notNull, primaryKey, defaultValue)"},"rows":{"method":"GET | POST","path":"/db/:uuid/table/:name/rows","description":"Query table rows or count total records","queryParams":{"limit":"Maximum number of rows to return (default 50, max 1000)","offset":"Number of rows to skip for pagination (default 0)","select":"Comma-separated list of column names (default '*')","count":"Options: 'only' (return total count only), 'true' (return both rows and total count)"}}}},"directSql":{"description":"Direct SQL execution engine with SQL safety guard","endpoints":{"d1":{"method":"POST","path":"/d1/:id","payload":"{ sql: 'SELECT * FROM users WHERE id = ?', params: [1] }"},"pg":{"method":"POST","path":"/pg/:id","payload":"{ sql: 'SELECT * FROM users WHERE id = $1', params: [1] }"}}},"management":{"description":"Administrative & synchronization endpoints","endpoints":{"syncD1":{"method":"POST","path":"/sync/d1","description":"Scan Cloudflare account for all D1 databases and update dbs/d1.json on R2 (requires Authorization token)"}}}}}