Storage Endpoints

abstract

Developer/admin database browser — inspect PostgreSQL tables, browse QuestDB time-series data, view Redis cache stats, and perform dangerous destructive operations (purge/truncate/flush) for maintenance.

🔒 Authentication

PropertyValue
MechanismNone
RequiredNo (⚠️ should be protected in production)

Endpoints in this group (10 total)

MethodPathDescription
GET/api/v1/storage/postgres/overviewPostgreSQL DB size + table count
GET/api/v1/storage/postgres/tablesAll tables with row count + size
GET/api/v1/storage/postgres/tables/{table}/rowsBrowse rows in a table (paginated)
DELETE/api/v1/storage/postgres/tables/{table}/purgeDelete rows older than N days
DELETE/api/v1/storage/postgres/tables/{table}/truncate⚠️ TRUNCATE table (irreversible)
GET/api/v1/storage/questdb/tablesQuestDB tables with row count
GET/api/v1/storage/questdb/tables/{table}/rowsBrowse QuestDB rows (paginated)
DELETE/api/v1/storage/questdb/tables/{table}⚠️ DROP QuestDB table (irreversible)
GET/api/v1/storage/redis/infoRedis memory, keys, hit rate
DELETE/api/v1/storage/redis/flush⚠️ Flush entire Redis cache

GET /api/v1/storage/postgres/overview

200 OK example:

{
  "db_size_mb": 145.2,
  "table_count": 16,
  "connection_count": 4,
  "postgres_version": "16.2"
}

GET /api/v1/storage/postgres/tables

200 OK example:

[
  { "table": "trades", "row_count": 12450, "size_mb": 8.4, "last_updated": "2026-05-16T14:00:00Z" },
  { "table": "llm_calls", "row_count": 45200, "size_mb": 22.1, "last_updated": "2026-05-16T14:30:00Z" }
]

DELETE /api/v1/storage/postgres/tables//truncate

IRREVERSIBLE — removes ALL rows from the table. Used in development to reset state.

warning

TRUNCATE cannot be undone. There is no confirmation dialog on the API. The frontend should show a confirmation prompt before calling this endpoint.


GET /api/v1/storage/redis/info

200 OK example:

{
  "used_memory_mb": 12.4,
  "total_keys": 384,
  "hit_rate_pct": 94.2,
  "evicted_keys": 0,
  "uptime_hours": 72
}

RolePath
Routerbackend/api/routes/storage.py
RoleLink
Frontend PagePage - Storage
InfrastructureDevOps - LLMSystemTrading