Hanzo AI
OpenapiFunction

List metrics

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

GET /v1/function/metrics

Addresshttps://api.hanzo.ai/v1/function/metrics
MethodGET
Operationget_function_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
rangequerystringRange is 1H, 6H, 24H (the default), 7D or 30D.

Response

StatusBodyMeaning
200function.usageok
defaultproblem-detailsrefused

200 body — 10 fields.

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

Failure carries the platform error shape — see Errors.

Examples

hanzo function metrics

Function API · All Hanzo APIs · Interactive reference

How is this guide?

On this page