Read a database or cache service's live statistics
Reads the engine behind a compose service (Postgres, MySQL, MariaDB, ClickHouse, MongoDB, Redis, Valkey or KeyDB) through its own protocol: throughput, latency, connections, cache hit ratio and memory, with the settings and opt-ins that shape them. Returns one frame of cumulative counters with every per-second value null. Sending `Accept: text/event-stream` instead follows it live, a frame every five seconds with rates over the interval, which never completes on its own.
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"{ "ts": 0, "engine": "postgres", "version": "string", "started": 0, "since": 0, "interval": 0, "insights": { "statements": "on", "slowLog": "on", "slowLogMs": 0, "enable": "none", "note": "string" }, "config": { "property1": "string", "property2": "string" }, "counters": { "property1": 0, "property2": 0 }, "sql": { "ops": 0, "opsUnit": "statements", "reads": 0, "writes": 0, "rwUnit": "rows", "latencyMs": 0, "p95Ms": 0, "cacheHit": 0, "connections": 0, "maxConnections": 0, "active": 0, "idle": 0, "idleInTransaction": 0, "waiting": 0, "deadlocks": 0, "databaseBytes": 0 }, "cache": { "ops": 0, "hits": 0, "misses": 0, "hitRatio": 0, "evicted": 0, "expired": 0, "errors": 0, "errorTypes": { "property1": 0, "property2": 0 }, "clients": 0, "blocked": 0, "usedMemory": 0, "maxMemory": 0, "policy": "string", "keys": 0, "expires": 0, "databases": [ { "db": 0, "keys": 0, "expires": 0 } ], "commands": [ { "name": "string", "calls": 0, "ops": 0, "usecPerCall": 0, "failed": 0, "rejected": 0, "p50": 0, "p99": 0, "p999": 0, "complexity": "string" } ] }}Read the settings behind a service's log GET
Returns the settings that decide what searchServiceRoleLog can find, read from the running engine (PostgreSQL's log_* settings, MySQL's error log and deadlock settings, Redis's slowlog and memory policy) or, for the service the app's address routes to, from the ingress. Also returns what they mean for each category and, for Redis, lines built from its memory and error counters, which Redis never logs. `serviceName` is a compose service.
Read a database's top statements GET
Returns the statements with the most time, the most calls and the slowest means, with their normalized text: pg_stat_statements on Postgres, performance_schema digests on MySQL and MariaDB, system.query_log over `range` on ClickHouse, per-collection totals on MongoDB. Statement text can carry data, so this needs the developer role. A one-shot read gives cumulative values; sending `Accept: text/event-stream` instead follows it live, a frame every fifteen seconds with calls and time over the interval.