Report who is calling this org's API right now
Traffic reports who is calling this organization's API right now: the request count for the last minute split by AGENCY LANE — agent, human, bot, unknown…
GET /v1/gateway/traffic
| Address | https://api.hanzo.ai/v1/gateway/traffic |
| Method | GET |
| Operation | gatewayTraffic |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Traffic reports who is calling this organization's API right now: the request count for the last minute split by AGENCY LANE — agent, human, bot, unknown — and the busiest callers behind it, each with its request count, its authentication-failure count, how many distinct paths it touched, and any verdict currently held against it.
The lane split is the answer to the question a generic bot filter cannot answer: which of this traffic is the customer's own automation and which is somebody working through a list. It is computed from credentials we issued, not from the client's self-description, so a scraper cannot move itself into the agent lane by editing a header.
A validated caller appears as a FINGERPRINT — a one-way, per-process digest. It is stable enough to recognise the same caller across a minute and cannot be turned back into a key, so this report is safe to read, screenshot and paste.
Scoped to the caller's own validated organization. A SuperAdmin may inspect a specific tenant with ?org=<slug>, or the lane that has no tenant — every caller the identity boundary could not validate — with an empty ?org=.
Request
GET /v1/gateway/traffic takes no parameters and no body — the credential is the whole request.
Response
| Status | Body | Meaning |
|---|---|---|
200 | TrafficView | ok |
200 body — 22 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
blind | body | integer | — | Blind is how many requests in the window carried no identity to attribute them to — no validated credential and no client address. |
callers | body | TrafficCaller[] | — | Callers is the scope's busiest callers this window. |
callers[].action | body | string | — | Action is the verdict currently held against it, if any. |
callers[].cred | body | string | — | Cred is the caller's key: a credential fingerprint (a per-process one-way digest, not a key) for a validated caller, and "ip:<addr>" for one that presented no… |
callers[].failures | body | integer | — | Failures is how many ended 401 or 403. |
callers[].held_until | body | integer | — | HeldUntil is when the held verdict lapses, unix seconds. |
callers[].paths | body | integer | — | Paths is the approximate number of distinct paths it touched (max 64). |
callers[].reason | body | string | — | Reason is why that verdict was reached. |
callers[].requests | body | integer | — | Requests is its request count in the window. |
ceiling | body | integer | — | Ceiling is the most callers this scope may hold at once. |
denied | body | integer | — | Denied is how many of them the gate refused. |
lanes | body | object | — | Lanes is the request count per lane — agent, human, bot, unknown. |
lanes.* | body | integer | — | |
mode | body | string | — | Mode is the abuse gate's posture for this scope: "shadow" records the scorer's action without enforcing it, "live" enforces it. |
org | body | string | — | Org is the scope this view was taken for — the validated principal's own, never a value the caller supplied. |
refused | body | integer | — | Refused is how many callers this scope's ceilings turned away in the window. |
requests | body | integer | — | Requests is how many requests this scope made in the window. |
screens | body | integer | — | Screens is how many of them were put to the scorer — the billable unit of the risk product. |
strain | body | string | — | Strain is what this scope's ceilings are doing: "clear" below them, "full" at them, "refuse" once a caller has been turned away inside this window — which… |
tracked | body | integer | — | Tracked is how many callers this scope holds state for right now, and Ceiling is the most it may hold. |
unscored | body | integer | — | Unscored is how many of those screens got NO answer — the scorer was absent, stuck, slow, erroring or silent. |
window_sec | body | integer | — | WindowSec is the span the counts cover, in seconds. |
Failure carries the platform error shape — see Errors.
Examples
hanzo gateway trafficimport { Configuration, GatewayApi } from 'hanzoai';
const api = new GatewayApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.gatewayTraffic();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import GatewayApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = GatewayApi(client).gateway_traffic()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.GatewayAPI.GatewayTraffic(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, gateway_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = gateway_api::gateway_traffic(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.GatewayApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new GatewayApi(client).gatewayTraffic();curl https://api.hanzo.ai/v1/gateway/traffic \
-H "Authorization: Bearer $HANZO_API_KEY"Tool gateway, op gatewayTraffic — 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": "gateway",
"arguments": {
"op": "gatewayTraffic",
"input": {}
}
}
}'How is this guide?