Hanzo
OpenapiMetrics

Ingest a MetricBatch — the same payload the ZAP transport carries

Writes every sample in a luxfi/metric `MetricBatch` into the calling org's store and answers `{written}`: the number of SAMPLES stored, not families and…

POST /v1/metrics/batch

Addresshttps://api.hanzo.ai/v1/metrics/batch
MethodPOST
Operationpost_metrics_batch
AuthAuthorization: Bearer $HANZO_API_KEY

Writes every sample in a luxfi/metric MetricBatch into the calling org's store and answers {written}: the number of SAMPLES stored, not families and not metrics. This is the exact wire shape the ZAP MsgMetricBatch transport carries, so the HTTP door and the optional ZAP push receiver share one code path and one meaning — the transport is an optimisation, never a different contract.

A counter or gauge lands as one sample. A histogram or summary contributes DERIVED <name>_sum and <name>_count series, so one metric can write more than one sample and written can exceed the number of metrics you sent. The batch's own TimestampNs stamps every sample it carries.

The tenant is the gateway-minted X-Org-Id header, falling back to the deployment brand and then default; each org gets its own store, WAL-durable under the deployment's data dir. A body that does not decode is 400.

Request

The document declares no body for POST /v1/metrics/batch. The handler is typed in cloud but its shape is not yet emitted, so the fields are not listed here — ask the MCP door's describe for post_metrics_batch, which answers from the running route.

Response

The document declares no response body for this operation. It answers 200 on success and the platform error shape on failure — see Errors.

Examples

hanzo metrics batch

Metrics API · All Hanzo APIs · Interactive reference

How is this guide?

On this page