Reports how much of the Hanzo fleet is up — the current per-service inventory…
Reports how much of the Hanzo fleet is up — the current per-service inventory plus an up-versus-reporting trend across the window.
GET /v1/o11y/availability
| Address | https://api.hanzo.ai/v1/o11y/availability |
| Method | GET |
| Operation | get_o11y_availability |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Reports how much of the Hanzo fleet is up — the current per-service inventory plus an up-versus-reporting trend across the window. Both come from the fleet prober's own measurements: every service is asked its health URL every 30 seconds, so a service is listed as down because it did not answer, never because something failed to collect it. PLATFORM SUDO ONLY — this is the whole fleet's inventory, not tenant data, so every customer is 403. An unreachable telemetry store answers 503 rather than an empty trend, because a board of zeroes and a fleet that is down look identical.
Request
2 fields.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
range | query | integer | — | Range is the trend window in seconds. |
stepSec | query | integer | — | StepSec is the bucket width in seconds, clamped to [30, 3600]. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | o11y.availabilityResponse | ok |
200 body — 12 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
range | body | object | — | Range is the window and bucket width actually used, after clamping — not what was asked for, which is why a caller reads it back rather than assuming. |
range.sinceSec | body | integer | — | |
range.stepSec | body | integer | — | |
series | body | o11y.availabilityPoint[] | — | Series is the trend, oldest bucket first. |
series[].t | body | string | — | T is the bucket start, RFC3339 in UTC. |
series[].total | body | integer | — | Total is how many services reported at all inside the bucket. |
series[].up | body | integer | — | Up is how many services were up at the end of the bucket. |
services | body | o11y.serviceUp[] | — | Services is the current inventory, sorted by name so two reads of an unchanged fleet are byte-identical. |
services[].name | body | string | — | Name is the service as the fleet prober knows it (probes.go's target name, which is the service label on hanzo_service_up). |
services[].up | body | boolean | — | Up is true when the service answered its own health URL on the last cycle. |
total | body | integer | — | Total is how many services the prober currently watches. |
up | body | integer | — | Up is how many services are up right now. |
Failure carries the platform error shape — see Errors.
Examples
hanzo o11y availabilityimport { Configuration, O11yApi } from 'hanzoai';
const api = new O11yApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getO11yAvailability();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_o11y_availability()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.O11yAPI.GetO11yAvailability(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_o11y_availability(&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).getO11yAvailability();curl https://api.hanzo.ai/v1/o11y/availability \
-H "Authorization: Bearer $HANZO_API_KEY"Tool o11y, op get_o11y_availability — 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": "get_o11y_availability",
"input": {}
}
}
}'How is this guide?