Hanzo
OpenapiO11y

Runs a Prometheus-style range query over metrics — the legacy read that…

Runs a Prometheus-style range query over metrics — the legacy read that predates the v5 querier — and returns the matrix, vector or scalar the query…

GET /v1/o11y/query_range

Addresshttps://api.hanzo.ai/v1/o11y/query_range
MethodGET
Operationget_o11y_query_range
AuthAuthorization: Bearer $HANZO_API_KEY

Runs a Prometheus-style range query over metrics — the legacy read that predates the v5 querier — and returns the matrix, vector or scalar the query resolved to.

Callers need the viewer role; the runtime's own gate enforces it.

Request

6 fields.

FieldInTypeRequiredDescription
startquerystringyesStart is the window start — a unix timestamp (seconds, with optional fraction) or an RFC 3339 time.
endquerystringyesEnd is the window end, in the same form as Start, and not before it.
stepquerystringyesStep is the query resolution, e.g.
queryquerystringyesQuery is the PromQL expression to evaluate.
statsquerystringStats, when "all", asks for query statistics alongside the result.
timeoutquerystringTimeout caps how long the query may run, e.g.

Response

StatusBodyMeaning
200o11y.O11yMetricsQueryRangeOutok

200 body — 2 fields.

FieldInTypeAlwaysDescription
databodyanyData is the result — its result type, the value, and query stats when asked.
statusbodystringStatus is "success".

Failure carries the platform error shape — see Errors.

Examples

hanzo o11y query_range get \
  --start <start> \
  --end <end> \
  --step <step> \
  --query <query>

O11y API · All Hanzo APIs · Interactive reference

How is this guide?

On this page