# List traffic

URL: https://docs.hanzo.ai/docs/openapi/gateway/gatewaytraffic

> 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`

> [Gateway →](https://docs.hanzo.ai/docs/openapi/gateway) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                           |
| ------------- | ----------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/gateway/traffic` |
| **Method**    | `GET`                                     |
| **Operation** | `gatewayTraffic`                          |
| **Auth**      | `Authorization: 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

| Status    | Body                | Meaning |
| --------- | ------------------- | ------- |
| `200`     | gateway.TrafficView | ok      |
| `default` | problem-details     | refused |

`200` body — 22 fields.

| Field                  | In   | Type                     | Always | Description                                                                                                                                                                                                                                        |
| ---------------------- | ---- | ------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `blind`                | body | integer (int64)          | —      | Blind is how many requests in the window carried no identity to attribute them to — no validated credential and no client address.                                                                                                                 |
| `callers`              | body | gateway.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 credential we could validate.                                                      |
| `callers[].failures`   | body | integer (int64)          | —      | Failures is how many ended 401 or 403.                                                                                                                                                                                                             |
| `callers[].held_until` | body | integer (int64)          | —      | HeldUntil is when the held verdict lapses, unix seconds.                                                                                                                                                                                           |
| `callers[].paths`      | body | integer (int64)          | —      | 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 (int64)          | —      | Requests is its request count in the window.                                                                                                                                                                                                       |
| `ceiling`              | body | integer (int64)          | —      | Ceiling is the most callers this scope may hold at once.                                                                                                                                                                                           |
| `denied`               | body | integer (int64)          | —      | 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 (int64)          | —      |                                                                                                                                                                                                                                                    |
| `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 (int64)          | —      | Refused is how many callers this scope's ceilings turned away in the window.                                                                                                                                                                       |
| `requests`             | body | integer (int64)          | —      | Requests is how many requests this scope made in the window.                                                                                                                                                                                       |
| `screens`              | body | integer (int64)          | —      | 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 means that caller is UNMEASURED and the numbers here are a sample rather than a census. |
| `tracked`              | body | integer (int64)          | —      | Tracked is how many callers this scope holds state for right now, and Ceiling is the most it may hold.                                                                                                                                             |
| `unscored`             | body | integer (int64)          | —      | Unscored is how many of those screens got NO answer — the scorer was absent, stuck, slow, erroring or silent.                                                                                                                                      |
| `window_sec`           | body | integer (int64)          | —      | WindowSec is the span the counts cover, in seconds.                                                                                                                                                                                                |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo gateway traffic
```

**SDK**

**.ts**

```ts
import { Configuration, GatewayApi } from 'hanzoai';

const api = new GatewayApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.gatewayTraffic();
```

**.py**

```python
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()
```

**.go**

```go
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
}
```

**.rs**

```rust
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?;
```

**.java**

```java
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();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/gateway/traffic \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

Tool `gateway`, op `gatewayTraffic` — POST the JSON-RPC envelope to `https://api.hanzo.ai/v1/mcp`.

```bash
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](https://docs.hanzo.ai/docs/openapi/gateway) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
