Returns the caller org's utilization series, oldest first.
Returns the caller org's utilization series, oldest first.
GET /v1/visor/fleet/samples
| Address | https://api.hanzo.ai/v1/visor/fleet/samples |
| Method | GET |
| Operation | listFleetSamples |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Returns the caller org's utilization series, oldest first.
A rejected narrower is a 400 carrying its own reason (the vocabulary is ours and safe to echo); a warehouse failure is logged and answered 503 "unavailable", because a chart that silently reads "no load" when the truth is "we cannot tell" is worse than one that says so. An ABSENT warehouse is different again: it returns an empty series, which renders honestly as "no samples yet".
Request
3 fields.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
unit | query | string | — | Unit selects one compute unit's series by its source-local id. |
source | query | string | — | Source selects one plane: "agent", "byo" or "visor". |
range | query | string | — | Range is the lookback window (e.g. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | sampleList | ok |
200 body — 17 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
samples | body | sampleView[] | — | Samples are the readings, OLDEST first — the order a chart plots. |
samples[].at | body | string | — | At is when the reading was MEASURED, RFC 3339 in UTC — the x-axis a chart plots against. |
samples[].costCents | body | integer | — | CostCents is what this unit resold for over the hour the reading falls in, in whole US cents. |
samples[].cpus | body | integer | — | CPUs is logical cores. The static capability rides every row on purpose: a chart can size load against cores without joining a registry whose row may since… |
samples[].gpuModel | body | string | — | GPUModel names the representative accelerator ("GB10"); GPUs carries how many. |
samples[].gpuUtil | body | number | — | GPUUtil is aggregate accelerator utilization as a FRACTION of 1 — 0.42 is 42% busy. |
samples[].gpus | body | integer | — | GPUs is how many accelerators the reading covers. |
samples[].host | body | string | — | Host is the hostname the unit reported at the time of the reading. |
samples[].kind | body | string | — | Kind is what the measured unit is: laptop, cloud, gpu, cluster, machine or worker. |
samples[].load1 | body | number | — | Load1 is the 1-minute load average — runnable processes, not a percentage. |
samples[].load5 | body | number | — | Load5 is the 5-minute load average, the same units as Load1. |
samples[].load15 | body | number | — | Load15 is the 15-minute load average, the same units as Load1. |
samples[].memFree | body | integer | — | MemFree is host memory available, in BYTES, as reported rather than derived. |
samples[].memUsed | body | integer | — | MemUsed is host memory in use, in BYTES. |
samples[].memory | body | integer | — | Memory is total system RAM in BYTES at the time of the reading. |
samples[].source | body | string | — | Source is the plane that reported the reading: "agent", "byo" or "visor" — the same vocabulary the board's rows carry, and what ?source= narrows on. |
samples[].unit | body | string | — | Unit is the source's own id for the measured unit. |
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.
import { Configuration, VisorApi } from 'hanzoai';
const api = new VisorApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.listFleetSamples();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import VisorApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = VisorApi(client).list_fleet_samples()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.VisorAPI.ListFleetSamples(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, visor_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = visor_api::list_fleet_samples(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.VisorApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new VisorApi(client).listFleetSamples();curl https://api.hanzo.ai/v1/visor/fleet/samples \
-H "Authorization: Bearer $HANZO_API_KEY"Tool visor, op listFleetSamples — 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": "visor",
"arguments": {
"op": "listFleetSamples",
"input": {}
}
}
}'How is this guide?