Schema Inspection & PostgreSQL Catalog — OQENS Cloud Docs
Inspect PostgreSQL table relationships, indexes, stored functions, and triggers.
The schema inspection API exposes relational metadata directly from the PostgreSQL information schema and pg_catalog.
Schema Tree & Foreign Keys
GET /api/dbaas/v2/projects/:slug/schema
curl -H "Authorization: Bearer oq_live_..." https://db.echo.oqens.me/api/dbaas/v2/projects/:slug/schema
Response Structure:
JSON Response
{
"ok": true,
"schema": [
{
"table_name": "orders",
"columns": [
{"column_name": "id", "data_type": "integer", "is_pk": true, "is_nullable": false},
{"column_name": "customer_id", "data_type": "integer", "is_fk": true, "is_nullable": false}
],
"foreign_keys": [
{"column_name": "customer_id", "foreign_table_name": "customers", "foreign_column_name": "id"}
]
}
]
}
Index Performance Catalog
GET /api/dbaas/v2/projects/:slug/indexes
curl -H "Authorization: Bearer oq_live_..." https://db.echo.oqens.me/api/dbaas/v2/projects/:slug/indexes