Cloady Docs
API ReferenceEndpointsWorkspaces

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.

GET
/api/workspaces/{workspaceSlug}/prometheus/api/v1/query
AuthorizationBearer <token>

Personal API token (cldy_…)

In: header

Path Parameters

workspaceSlug*string

Query Parameters

env?string

Only the apps in this env; every env when absent

Value in

  • "production"
  • "preview"
  • "development"
region?string

Only the apps in this region; every region when absent

query*string

A PromQL expression

Length1 <= length
time?string

When 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}