Query metrics across a workspace's apps
Runs a PromQL query at one instant across the metrics of every app in the workspace, or only those in `env` and `region`, and returns Prometheus's answer unchanged. Group by `namespace` to tell the apps apart. 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.
Authorization
cloady Personal API token (cldy_…)
In: header
Path Parameters
Query Parameters
Only the apps in this env; every env when absent
Value in
- "production"
- "preview"
- "development"
Only the apps in this region; every region when absent
A PromQL expression
1 <= lengthWhen to evaluate the query, as Unix seconds or RFC 3339; now when absent
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/workspaces/string/prometheus/api/v1/query?query=string"{ "status": "string", "data": { "resultType": "string", "result": [ null ], "property1": null, "property2": null }, "errorType": "string", "error": "string", "warnings": [ "string" ], "property1": null, "property2": null}Read the health of a workspace's services GET
Returns each service of the workspace's apps in `env` and `region` with its CPU, memory, replicas, restarts, volumes and requests, as Monitor's service picker shows them, read from the platform's own scrape. It answers on every plan.
Read a trace GET
Returns the spans the workspace's apps sent in a trace, in tree order, with each span's service, timing, status, first exception and attributes. Spans from outside the workspace are left out. Answers 404 when no span of the trace belongs to the workspace, it was sampled out, or it is older than 7 days.