Hanzo
OpenapiEvent

Overview returns the caller org's analytics KPIs for one time window.

Overview returns the caller org's analytics KPIs for one time window.

GET /v1/event/overview

Addresshttps://api.hanzo.ai/v1/event/overview
MethodGET
Operationget_event_overview
AuthAuthorization: Bearer $HANZO_API_KEY

Overview returns the caller org's analytics KPIs for one time window. Three lenses over one warehouse: llm is the live per-org LLM usage ledger (requests, tokens, spend, models, providers, errors) and is always real; web (pageviews, visitors, sessions) and commerce (orders, revenue, AOV) read the product-event table and report available=false rather than fabricating zeros when it holds nothing yet.

The org is the validated principal's — never a parameter — so a caller can only ever read its own tenant. 403 without a validated bearer, 400 on an unknown range, 503 when the warehouse is unreachable.

Request

3 fields.

FieldInTypeRequiredDescription
rangequerystringRange is a relative window: a count and a unit — 24h, 7d, 90d, any <N>h or <N>d — or day, week, month, all. Default 24h.
startquerystringStart is the inclusive lower bound of a custom window, RFC3339.
endquerystringEnd is the exclusive upper bound of a custom window, RFC3339.

Response

StatusBodyMeaning
200Overviewok

200 body — 32 fields.

FieldInTypeAlwaysDescription
commercebodyCommerceOverview
commerce.aovbodynumberAOV is average order value — Revenue/Orders, rounded to two places.
commerce.availablebodybooleanAvailable is false when the product-event table could not be read — the lens is reported missing rather than as zeros that look like no sales.
commerce.ordersbodyintegerOrders is how many order_completed events landed in the window.
commerce.reasonbodystringReason says why the lens is unavailable.
commerce.revenuebodynumberRevenue is the total those orders carried, in the events' own currency unit.
commerce.sourcebodystringSource is the warehouse table the lens read.
endbodystringEnd is the window's exclusive upper bound, RFC3339 UTC.
intervalbodystringInterval is the bucket width the window implies: hour or day.
llmbodyLLMOverview
llm.availablebodybooleanAvailable is true whenever the ledger answered — including with no usage in the window, which is honest zeros rather than a missing lens.
llm.completionTokensbodyintegerCompletionTokens is the output half of Tokens.
llm.errorRatebodynumberErrorRate is Errors/Requests, 0..1, rounded to three places.
llm.errorsbodyintegerErrors is how many of Requests failed.
llm.modelsbodyintegerModels is how many distinct models the org called.
llm.promptTokensbodyintegerPromptTokens is the input half of Tokens.
llm.providersbodyintegerProviders is how many distinct providers served them.
llm.requestsbodyintegerRequests is how many LLM calls the org made in the window.
llm.sourcebodystringSource is the warehouse table the lens read.
llm.spendCentsbodyintegerSpendCents is what those calls cost, in cents.
llm.tokensbodyintegerTokens is prompt plus completion tokens over those calls.
rangebodystringRange is the window that was actually applied: 24h, 7d, 30d or custom.
scopebodyScope
scope.orgbodystringOrg is the IAM org slug the rows were read under: the validated principal's, resolved server-side.
startbodystringStart is the window's inclusive lower bound, RFC3339 UTC.
webbodyWebOverview
web.availablebodybooleanAvailable is false when the product-event table could not be read — the lens is reported missing rather than as zeros that look like real traffic.
web.pageviewsbodyintegerPageviews is how many $pageview events landed in the window.
web.reasonbodystringReason says why the lens is unavailable.
web.sessionsbodyintegerSessions is how many distinct visits they span.
web.sourcebodystringSource is the warehouse table the lens read.
web.visitorsbodyintegerVisitors is how many distinct people those pageviews came from.

Failure carries the platform error shape — see Errors.

Examples

hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.


Event API · All Hanzo APIs · Interactive reference

How is this guide?

On this page