Query an app's logs
Runs a LogQL query over the app's own logs, kept for seven days, and returns Loki's answer unchanged: lines for a log query, series for a metric query. Streams: `{container="<service>"}` is each compose service's own output, with `pod` and a `detected_level` (error, critical, fatal, warn, info, debug, trace or unknown) to filter on as `| detected_level=~"error|critical|fatal"`; `{container="_events"}` holds the Kubernetes events about the app's objects as JSON (`kind`, `name`, `reason`, `type`, `msg`, `count`); `{container="_access", service="<service>"}` is the ingress access log of the service the app's address routes to, as Traefik's JSON (`RequestMethod`, `RequestPath`, `DownstreamStatus`, `Duration` in nanoseconds, `request_User-Agent`), with `route`, `method` and `status` as fields; and `{container="_rum", kind="pageview"}` with kinds `vital`, `error`, `net`, `signal`, `custom` and `session` holds browser monitoring, with `page`, `session`, `device`, `browser`, `os` and `country` as fields. Session recordings are kept apart: getBrowserSessionReplay reads them, with the developer role. A query the store refuses comes back with the store's own status and `error`. The path is the store's own, so a Grafana data source can point here too.
Authorization
cloady Personal API token (cldy_…)
In: header
Path Parameters
Query Parameters
Value in
- "production"
- "preview"
- "development"
A LogQL query: a log query returns lines, a metric query such as sum by (detected_level) (count_over_time({container="web"} [5m])) returns series
1 <= lengthStart of the range, as Unix seconds, Unix nanoseconds or RFC 3339; an hour before end when absent
End of the range; now when absent
Most lines to return for a log query, 100 when absent
backward, the default, returns the newest lines first
Value in
- "backward"
- "forward"
Seconds between points of a metric query, or a duration such as 1m
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/workspaces/string/apps/string/loki/api/v1/query_range?query=string"{ "status": "string", "data": { "resultType": "string", "result": [ null ], "property1": null, "property2": null }, "errorType": "string", "error": "string", "warnings": [ "string" ], "property1": null, "property2": null}Query an app's metrics over a range GET
Runs a PromQL query at every step of a range against the app's own metrics, kept for 62 days, and returns Prometheus's answer unchanged: one `matrix` series per label set. Only the app's series are visible. The labels and series are queryAppMetrics'. A query the store refuses comes back with the store's own status and `error`. The path is the store's own, so a Grafana data source can point here too.
Read browser monitoring GET
Returns the app's public browser key, the script URL and the hosts allowed to send beacons, from which the snippet is built, when the newest beacon arrived and the settings its snippet carries, the tag Cloady adds at the edge if it adds one, and LCP p75 and active sessions over the range once pages send beacons. Browser monitoring is on while the app's pages carry the snippet, whose own attributes set replay share, masking and the conversion goal, or while Cloady adds it at the edge, whose settings are the one thing stored: the app variable CLOADY_BROWSER_MONITORING.