Sample a cache's keyspace
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.
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/keyspace"{ "ts": 0, "dbsize": 0, "sampled": 0, "method": "scan", "prefixes": [ { "prefix": "string", "keys": 0, "estimated": 0, "bytes": 0, "share": 0, "noTtl": 0, "ttlMs": 0 } ], "biggest": [ { "key": "string", "prefix": "string", "type": "string", "bytes": 0, "ttlMs": 0 } ]}Read a database's tables, sizes and unused indexes GET
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.
Read a database's slow statements GET
Returns statements slower than the engine's own threshold across `range`, newest first: Postgres `duration:` log lines, MongoDB slow operation log lines, ClickHouse system.query_log, the performance_schema statement history on MySQL and MariaDB, and SLOWLOG (COMMANDLOG on Valkey) on a cache. The last two keep only recent entries. Needs the developer role, because statements and command arguments carry data.