Read a database's tables, sizes and unused indexes
Returns each database's size, the largest 100 tables or collections with rows, table and index bytes, dead tuples and vacuum state on Postgres and reclaimable space elsewhere, and the indexes nothing has used since the counters began. Names the schema, so it needs the developer role.
Authorization
cloady Personal API token (cldy_…)
In: header
Path Parameters
Query Parameters
Value in
- "production"
- "preview"
- "development"
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/workspaces/string/apps/string/services/string/engine/storage"{ "ts": 0, "engine": "postgres", "databases": [ { "name": "string", "bytes": 0 } ], "tables": [ { "database": "string", "schema": "string", "name": "string", "kind": "string", "rows": 0, "tableBytes": 0, "indexBytes": 0, "deadRows": 0, "deadRatio": 0, "reclaimableBytes": 0, "lastVacuum": 0, "vacuumBehind": true } ], "deadRows": 0, "reclaimableBytes": 0, "unused": [ { "database": "string", "table": "string", "name": "string", "bytes": 0 } ], "unusedSince": 0, "unusedNote": "string", "note": "string"}Cancel a session's query or terminate the session DELETE
Cancels the statement a session is running (`mode=cancel`) or ends its connection (`mode=terminate`, the default): pg_cancel_backend or pg_terminate_backend, KILL QUERY or KILL, killOp on MongoDB, KILL QUERY on ClickHouse. `sessionId` comes from streamEngineSessions.
Sample a cache's keyspace GET
Samples up to 2,000 keys of database 0 within two seconds, without touching their LRU or LFU clocks where the server allows it, and groups them by the text before the first colon: share of sampled memory, keys, TTLs and the largest keys. Key names can carry data, so this needs the developer role.