Endpoint Stats

GET /v1/stats/tunnels/{uuid}

Aggregate stats for one tunnel — request counts, byte totals and active connections. The {uuid} is the tunnel's uuid from /tunnels.

Functionally similar to /traffic/endpoints/{tunnel_uuid}/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

uuid string (uuid) Req
The tunnel's uuid from /tunnels.

Deprecated: the legacy integer id is still accepted in the path until the sunset, answered with Deprecation and Sunset headers. Use the uuid.

Response (200 OK)

tunnel_uuid string (uuid)
Echo of the tunnel's uuid.
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.

Deprecated: until the sunset this response also carries the legacy integer id and *_id fields. Don't use them; read uuid and the *_uuid fields.

Errors

400 Bad Request
An integer id after the sunset (integer_id_unsupported).
401 Unauthorized
Missing auth.
404 Not Found
Tunnel doesn't exist or isn't in your active account (another account's uuid reads exactly like an unknown one).
Request
curl "https://api.ngris.com/v1/stats/tunnels/019ab73a-b951-7031-aea5-1435da834122" \ -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/019ab73a-b951-7031-aea5-1435da834122") print(f"{stats['requests']:,} req, {stats['active_connections']} active conns")
Response — 200 OK
{ "tunnel_uuid": "019ab73a-b951-7031-aea5-1435da834122", "bytes_in": 1234567, "bytes_out": 7654321, "requests": 12345, "active_connections": 3, "last_updated": "2026-04-29T13:00:00Z" }
Was this helpful?
On this page
Endpoint Stats
Was this helpful?