Hanzo AI
OpenapiFunctions

List metrics

Is the org's serverless dashboard over a window: a per-function invocation costLine and how those invocations ended.

GET /v1/functions/metrics

Addresshttps://api.hanzo.ai/v1/functions/metrics
MethodGET
Operationget_functions_metrics
AuthAuthorization: Bearer $HANZO_API_KEY

Is the org's serverless dashboard over a window: a per-function invocation costLine and how those invocations ended.

Every point is a REAL count of rows that fell in that bucket — nothing is interpolated or invented, so an empty window draws a flat line rather than a fabricated one.

costCents is null and stays null: there is no per-invocation cost source to read, and reporting a number computed some other way would be a guess presented as a measurement. Requires a validated principal; the read is scoped to its org.

Request

1 field.

FieldInTypeRequiredDescription
rangequerystring—Range is 1H, 6H, 24H (the default), 7D or 30D.

Response

StatusBodyMeaning
200usageok

200 body — 10 fields.

FieldInTypeAlwaysDescription
costCentsbodyinteger—null — no per-invocation cost source
seriesbodycostLine[]—one line per function that ran in the window
series[].keybodystring—the function the line is about
series[].pointsbodypointView[]—one point per bucket, oldest first
series[].points[].tbodystring—the bucket's start, RFC3339 (UTC)
series[].points[].vbodyinteger—how many invocations fell in it — a real count, never interpolated
statusbodystatusBreakdown—
status.errorbodyinteger—invocations that ran and failed
status.successbodyinteger—invocations whose code ran and wrote nothing to stderr
status.timeoutbodyinteger—invocations that hit their configured deadline

Failure carries the platform error shape — see Errors.

Examples

hanzo functions metrics

Functions API · All Hanzo APIs · Interactive reference

How is this guide?

On this page