Read a service's metrics over time
Returns CPU and memory against their limits, network and disk throughput, ready replicas, and for the service the app's address routes to, requests per second by status class and response-time quantiles. Also returns restarts and out-of-memory kills within the range, each running pod, and the Kubernetes events about the service. `serviceName` is a compose service.
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
curl -X GET "https://example.com/api/workspaces/string/apps/string/services/string/metrics"{ "start": 0, "step": 0, "series": { "cpu": [ 0 ], "cpuLimit": [ 0 ], "memory": [ 0 ], "memoryLimit": [ 0 ], "netIn": [ 0 ], "netOut": [ 0 ], "diskRead": [ 0 ], "diskWrite": [ 0 ], "ready": [ 0 ], "p50": [ 0 ], "p95": [ 0 ], "p99": [ 0 ], "http2xx": [ 0 ], "http3xx": [ 0 ], "http4xx": [ 0 ], "http5xx": [ 0 ] }, "restarts": 0, "ooms": 0, "pods": [ { "name": "string", "ready": true, "cpu": 0, "memory": 0, "restarts": 0 } ], "events": [ { "ts": 0, "type": "string", "reason": "string", "message": "string", "object": "string", "count": 0 } ]}Read a container's recent logs GET
Returns the last 200 log lines of one container as `{container, state, logs}`; `state` is `no-pod` when nothing is running. `serviceName` is a compose service. Sending `Accept: text/event-stream` instead follows the log live as server-sent events, one bare `data:` frame per line, which never completes on its own.
Search a service's log history GET
Searches the service's logs over the range, kept for seven days, and returns the newest 300 matching lines with their level and pod, plus how many lines of each level matched per bucket. `serviceName` is a compose service.