Read a database's slow statements
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.
Authorization
cloady Personal API token (cldy_…)
In: header
Path Parameters
Query Parameters
Value in
- "production"
- "preview"
- "development"
How far back to look; the answer has 30 to 96 points across it
"1h"Value in
- "15m"
- "1h"
- "6h"
- "24h"
- "7d"
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/slowlog"{ "source": "log", "thresholdMs": 0, "note": "string", "entries": [ { "ts": 0, "durationMs": 0, "client": "string", "database": "string", "statement": "string", "tables": [ "string" ], "statementId": "string" } ]}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.
Explain a statement's plan POST
Plans a statement from streamEngineStatements without running it: EXPLAIN (GENERIC_PLAN) in a read-only transaction on Postgres 16 and later, EXPLAIN FORMAT=JSON on the digest's sample text on MySQL. Flags a sequential scan with a filter on a table of 10,000 rows or more and suggests an index built from the plan's columns.