List 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.

GET /v1/gateway/traffic

Addresshttps://api.hanzo.ai/v1/gateway/traffic
MethodGET
OperationgatewayTraffic
AuthAuthorization: Bearer $HANZO_API_KEY

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.

It also reports what the sensor's own ceilings are doing (strain, tracked, ceiling, refused) and how many screens the scorer did not answer (unscored), so a control that has stopped measuring or a judge that has stopped answering is a number here rather than a quiet day.

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

StatusBodyMeaning
200gateway.TrafficViewok
defaultproblem-detailsrefused

200 body — 22 fields.

FieldInTypeAlwaysDescription
blindbodyinteger (int64)—Blind is how many requests in the window carried no identity to attribute them to — no validated credential and no client address.
callersbodygateway.TrafficCaller[]—Callers is the scope's busiest callers this window.
callers[].actionbodystring—Action is the verdict currently held against it, if any.
callers[].credbodystring—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 credential we could validate.
callers[].failuresbodyinteger (int64)—Failures is how many ended 401 or 403.
callers[].held_untilbodyinteger (int64)—HeldUntil is when the held verdict lapses, unix seconds.
callers[].pathsbodyinteger (int64)—Paths is the approximate number of distinct paths it touched (max 64).
callers[].reasonbodystring—Reason is why that verdict was reached.
callers[].requestsbodyinteger (int64)—Requests is its request count in the window.
ceilingbodyinteger (int64)—Ceiling is the most callers this scope may hold at once.
deniedbodyinteger (int64)—Denied is how many of them the gate refused.
lanesbodyobject—Lanes is the request count per lane — agent, human, bot, unknown.
lanes.*bodyinteger (int64)—
modebodystring—Mode is the abuse gate's posture for this scope: "shadow" records the scorer's action without enforcing it, "live" enforces it.
orgbodystring—Org is the scope this view was taken for — the validated principal's own, never a value the caller supplied.
refusedbodyinteger (int64)—Refused is how many callers this scope's ceilings turned away in the window.
requestsbodyinteger (int64)—Requests is how many requests this scope made in the window.
screensbodyinteger (int64)—Screens is how many of them were put to the scorer — the billable unit of the risk product.
strainbodystring—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 means that caller is UNMEASURED and the numbers here are a sample rather than a census.
trackedbodyinteger (int64)—Tracked is how many callers this scope holds state for right now, and Ceiling is the most it may hold.
unscoredbodyinteger (int64)—Unscored is how many of those screens got NO answer — the scorer was absent, stuck, slow, erroring or silent.
window_secbodyinteger (int64)—WindowSec is the span the counts cover, in seconds.

Failure carries the platform error shape — see Errors.

Examples

hanzo gateway traffic
import { 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 := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.GatewayAPI.GatewayTraffic(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::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.setBearerToken(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": {}
         }
       }
     }'

Gateway API · All Hanzo APIs · Interactive reference

Was this page useful?