Endpoint Stats
Aggregate stats for one configured endpoint — request counts, byte totals, and latency percentiles over the requested window. Despite the URL slug saying "tunnels", the {id} here is the endpoint UUID; this is the historical name from when the platform conflated tunnels and endpoints.
Functionally similar to /traffic/endpoints/{id}/metrics but uses pre-aggregated stat counters rather than the log store, so it's faster on long windows but slightly less granular.
Path parameters
id string (uuid) Req
Endpoint UUID.
Response (200 OK)
tunnel_id int64
Echo of the tunnel ID.
requests int64
Total request count.
bytes_in, bytes_out int64
Bandwidth totals (bytes).
active_connections int
Currently active connections.
last_updated string (RFC 3339)
When these figures were last refreshed.
Errors
401 Unauthorized
Missing auth.
404 Not Found
Endpoint doesn't exist or doesn't belong to the calling user.
Request
curl "https://api.ngris.com/v1/stats/tunnels/abc-123" \
-H "X-API-KEY: <your_api_key>"
Python
from ngris import Ngris
client = Ngris(api_key="<your_api_key>")
stats = client._get_raw("/stats/tunnels/abc-123")
print(f"{stats['requests']:,} req, {stats['active_connections']} active conns")
Response — 200 OK
{
"tunnel_id": 4521,
"bytes_in": 1234567,
"bytes_out": 7654321,
"requests": 12345,
"active_connections": 3,
"last_updated": "2026-04-29T13:00:00Z"
}