OpenapiO11y
Returns ingested vs retained series over time across all volume-control rules,…
Returns ingested vs retained series over time across all volume-control rules, in hourly buckets, in the query-range time-series response shape.
GET /v1/o11y/metric_reduction_rules/timeseries
| Address | https://api.hanzo.ai/v1/o11y/metric_reduction_rules/timeseries |
| Method | GET |
| Operation | GetMetricReductionRuleTimeseries |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Returns ingested vs retained series over time across all volume-control rules, in hourly buckets, in the query-range time-series response shape.
Request
GET /v1/o11y/metric_reduction_rules/timeseries takes no parameters and no body — the credential is the whole request.
Response
| Status | Body | Meaning |
|---|---|---|
200 | o11y.O11yReductionSeriesOut | ok |
200 body — 97 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
data | body | o11y.O11yQueryRange | — | |
data.data | body | o11y.O11yQueryRangeData | — | |
data.data.results | body | o11y.O11yReductionSeriesResult[] | — | Results are the per-query results, each a set of aggregated series. |
data.data.results[].aggregations | body | o11y.O11yAggregation[] | — | Aggregations are the query's aggregation buckets. |
data.data.results[].aggregations[].alias | body | string | — | Alias is the aggregation's alias. |
data.data.results[].aggregations[].anomalyScores | body | o11y.O11yMetricSeries[] | — | AnomalyScores are anomaly overlays. |
data.data.results[].aggregations[].anomalyScores[].labels | body | o11y.O11yMetricLabel[] | — | Labels identify the series. |
data.data.results[].aggregations[].anomalyScores[].labels[].key | body | o11y.O11yMetricField | — | |
data.data.results[].aggregations[].anomalyScores[].labels[].key.description | body | string | — | Description describes the field. |
data.data.results[].aggregations[].anomalyScores[].labels[].key.fieldContext | body | string | — | FieldContext is the context the field lives in, e.g. |
data.data.results[].aggregations[].anomalyScores[].labels[].key.fieldDataType | body | string | — | FieldDataType is the field's data type. |
data.data.results[].aggregations[].anomalyScores[].labels[].key.name | body | string | — | Name is the field's name. |
data.data.results[].aggregations[].anomalyScores[].labels[].key.signal | body | string | — | Signal is the telemetry signal the field belongs to. |
data.data.results[].aggregations[].anomalyScores[].labels[].key.unit | body | string | — | Unit is the field's unit. |
data.data.results[].aggregations[].anomalyScores[].labels[].value | body | object | — | Value is the label's value. |
data.data.results[].aggregations[].anomalyScores[].values | body | o11y.O11yMetricPoint[] | — | Values are the series' points, in time order. |
data.data.results[].aggregations[].anomalyScores[].values[].partial | body | boolean | — | Partial marks a point whose bucket the window only partly covers. |
data.data.results[].aggregations[].anomalyScores[].values[].timestamp | body | integer | — | Timestamp is the point's time as a Unix timestamp in milliseconds. |
data.data.results[].aggregations[].anomalyScores[].values[].value | body | number | — | Value is the point's value. |
data.data.results[].aggregations[].anomalyScores[].values[].values | body | number[] | — | Values carries the bucket values of a heatmap point. |
data.data.results[].aggregations[].index | body | integer | — | Index is the aggregation's position in the query. |
data.data.results[].aggregations[].lowerBoundSeries | body | o11y.O11yMetricSeries[] | — | LowerBoundSeries are forecast lower bounds. |
data.data.results[].aggregations[].lowerBoundSeries[].labels | body | o11y.O11yMetricLabel[] | — | Labels identify the series. |
data.data.results[].aggregations[].lowerBoundSeries[].labels[].key | body | o11y.O11yMetricField | — | |
data.data.results[].aggregations[].lowerBoundSeries[].labels[].key.description | body | string | — | Description describes the field. |
data.data.results[].aggregations[].lowerBoundSeries[].labels[].key.fieldContext | body | string | — | FieldContext is the context the field lives in, e.g. |
data.data.results[].aggregations[].lowerBoundSeries[].labels[].key.fieldDataType | body | string | — | FieldDataType is the field's data type. |
data.data.results[].aggregations[].lowerBoundSeries[].labels[].key.name | body | string | — | Name is the field's name. |
data.data.results[].aggregations[].lowerBoundSeries[].labels[].key.signal | body | string | — | Signal is the telemetry signal the field belongs to. |
data.data.results[].aggregations[].lowerBoundSeries[].labels[].key.unit | body | string | — | Unit is the field's unit. |
data.data.results[].aggregations[].lowerBoundSeries[].labels[].value | body | object | — | Value is the label's value. |
data.data.results[].aggregations[].lowerBoundSeries[].values | body | o11y.O11yMetricPoint[] | — | Values are the series' points, in time order. |
data.data.results[].aggregations[].lowerBoundSeries[].values[].partial | body | boolean | — | Partial marks a point whose bucket the window only partly covers. |
data.data.results[].aggregations[].lowerBoundSeries[].values[].timestamp | body | integer | — | Timestamp is the point's time as a Unix timestamp in milliseconds. |
data.data.results[].aggregations[].lowerBoundSeries[].values[].value | body | number | — | Value is the point's value. |
data.data.results[].aggregations[].lowerBoundSeries[].values[].values | body | number[] | — | Values carries the bucket values of a heatmap point. |
data.data.results[].aggregations[].meta | body | o11y.O11yAggregationMeta | — | |
data.data.results[].aggregations[].meta.unit | body | string | — | Unit is the aggregation's unit. |
data.data.results[].aggregations[].predictedSeries | body | o11y.O11yMetricSeries[] | — | PredictedSeries are forecast overlays, when the query asked for them. |
data.data.results[].aggregations[].predictedSeries[].labels | body | o11y.O11yMetricLabel[] | — | Labels identify the series. |
data.data.results[].aggregations[].predictedSeries[].labels[].key | body | o11y.O11yMetricField | — | |
data.data.results[].aggregations[].predictedSeries[].labels[].key.description | body | string | — | Description describes the field. |
data.data.results[].aggregations[].predictedSeries[].labels[].key.fieldContext | body | string | — | FieldContext is the context the field lives in, e.g. |
data.data.results[].aggregations[].predictedSeries[].labels[].key.fieldDataType | body | string | — | FieldDataType is the field's data type. |
data.data.results[].aggregations[].predictedSeries[].labels[].key.name | body | string | — | Name is the field's name. |
data.data.results[].aggregations[].predictedSeries[].labels[].key.signal | body | string | — | Signal is the telemetry signal the field belongs to. |
data.data.results[].aggregations[].predictedSeries[].labels[].key.unit | body | string | — | Unit is the field's unit. |
data.data.results[].aggregations[].predictedSeries[].labels[].value | body | object | — | Value is the label's value. |
data.data.results[].aggregations[].predictedSeries[].values | body | o11y.O11yMetricPoint[] | — | Values are the series' points, in time order. |
data.data.results[].aggregations[].predictedSeries[].values[].partial | body | boolean | — | Partial marks a point whose bucket the window only partly covers. |
data.data.results[].aggregations[].predictedSeries[].values[].timestamp | body | integer | — | Timestamp is the point's time as a Unix timestamp in milliseconds. |
data.data.results[].aggregations[].predictedSeries[].values[].value | body | number | — | Value is the point's value. |
data.data.results[].aggregations[].predictedSeries[].values[].values | body | number[] | — | Values carries the bucket values of a heatmap point. |
data.data.results[].aggregations[].series | body | o11y.O11yMetricSeries[] | — | Series are the aggregated time series. |
data.data.results[].aggregations[].series[].labels | body | o11y.O11yMetricLabel[] | — | Labels identify the series. |
data.data.results[].aggregations[].series[].labels[].key | body | o11y.O11yMetricField | — | |
data.data.results[].aggregations[].series[].labels[].key.description | body | string | — | Description describes the field. |
data.data.results[].aggregations[].series[].labels[].key.fieldContext | body | string | — | FieldContext is the context the field lives in, e.g. |
data.data.results[].aggregations[].series[].labels[].key.fieldDataType | body | string | — | FieldDataType is the field's data type. |
data.data.results[].aggregations[].series[].labels[].key.name | body | string | — | Name is the field's name. |
data.data.results[].aggregations[].series[].labels[].key.signal | body | string | — | Signal is the telemetry signal the field belongs to. |
data.data.results[].aggregations[].series[].labels[].key.unit | body | string | — | Unit is the field's unit. |
data.data.results[].aggregations[].series[].labels[].value | body | object | — | Value is the label's value. |
data.data.results[].aggregations[].series[].values | body | o11y.O11yMetricPoint[] | — | Values are the series' points, in time order. |
data.data.results[].aggregations[].series[].values[].partial | body | boolean | — | Partial marks a point whose bucket the window only partly covers. |
data.data.results[].aggregations[].series[].values[].timestamp | body | integer | — | Timestamp is the point's time as a Unix timestamp in milliseconds. |
data.data.results[].aggregations[].series[].values[].value | body | number | — | Value is the point's value. |
data.data.results[].aggregations[].series[].values[].values | body | number[] | — | Values carries the bucket values of a heatmap point. |
data.data.results[].aggregations[].upperBoundSeries | body | o11y.O11yMetricSeries[] | — | UpperBoundSeries are forecast upper bounds. |
data.data.results[].aggregations[].upperBoundSeries[].labels | body | o11y.O11yMetricLabel[] | — | Labels identify the series. |
data.data.results[].aggregations[].upperBoundSeries[].labels[].key | body | o11y.O11yMetricField | — | |
data.data.results[].aggregations[].upperBoundSeries[].labels[].key.description | body | string | — | Description describes the field. |
data.data.results[].aggregations[].upperBoundSeries[].labels[].key.fieldContext | body | string | — | FieldContext is the context the field lives in, e.g. |
data.data.results[].aggregations[].upperBoundSeries[].labels[].key.fieldDataType | body | string | — | FieldDataType is the field's data type. |
data.data.results[].aggregations[].upperBoundSeries[].labels[].key.name | body | string | — | Name is the field's name. |
data.data.results[].aggregations[].upperBoundSeries[].labels[].key.signal | body | string | — | Signal is the telemetry signal the field belongs to. |
data.data.results[].aggregations[].upperBoundSeries[].labels[].key.unit | body | string | — | Unit is the field's unit. |
data.data.results[].aggregations[].upperBoundSeries[].labels[].value | body | object | — | Value is the label's value. |
data.data.results[].aggregations[].upperBoundSeries[].values | body | o11y.O11yMetricPoint[] | — | Values are the series' points, in time order. |
data.data.results[].aggregations[].upperBoundSeries[].values[].partial | body | boolean | — | Partial marks a point whose bucket the window only partly covers. |
data.data.results[].aggregations[].upperBoundSeries[].values[].timestamp | body | integer | — | Timestamp is the point's time as a Unix timestamp in milliseconds. |
data.data.results[].aggregations[].upperBoundSeries[].values[].value | body | number | — | Value is the point's value. |
data.data.results[].aggregations[].upperBoundSeries[].values[].values | body | number[] | — | Values carries the bucket values of a heatmap point. |
data.data.results[].queryName | body | string | — | QueryName names the query the result answers. |
data.meta | body | o11y.O11yQueryStats | — | |
data.meta.bytesScanned | body | integer | — | BytesScanned is how many bytes the query read. |
data.meta.durationMs | body | integer | — | DurationMS is how long the query took, in milliseconds. |
data.meta.rowsScanned | body | integer | — | RowsScanned is how many rows the query read. |
data.meta.stepIntervals | body | object | — | StepIntervals is the step used per query, in seconds. |
data.meta.stepIntervals.* | body | integer | — | |
data.type | body | string | — | Type is the result kind; time_series here. |
data.warning | body | o11y.O11yQueryWarning | — | |
data.warning.message | body | string | — | Message is the warning. |
data.warning.url | body | string | — | URL points at the relevant documentation. |
data.warning.warnings | body | o11y.O11yQueryWarningNote[] | — | Warnings carries additional notes. |
data.warning.warnings[].message | body | string | — | Message is the note. |
status | body | string | — | Status is "success". |
Failure carries the platform error shape — see Errors.
Examples
hanzo o11y metric_reduction_rules timeseriesimport { Configuration, O11yApi } from 'hanzoai';
const api = new O11yApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getMetricReductionRuleTimeseries();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import O11yApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = O11yApi(client).get_metric_reduction_rule_timeseries()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.O11yAPI.GetMetricReductionRuleTimeseries(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, o11y_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = o11y_api::get_metric_reduction_rule_timeseries(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.O11yApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new O11yApi(client).getMetricReductionRuleTimeseries();curl https://api.hanzo.ai/v1/o11y/metric_reduction_rules/timeseries \
-H "Authorization: Bearer $HANZO_API_KEY"Tool o11y, op GetMetricReductionRuleTimeseries — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "o11y",
"arguments": {
"op": "GetMetricReductionRuleTimeseries",
"input": {}
}
}
}'How is this guide?