Per-Endpoint Traffic Metrics
Summary traffic metrics for a single tunnel plus an hourly time series. Despite the route's historical name, the path takes the tunnel's uuid (from /tunnels), not an endpoint's. Scoped to the active account. Note this route uses its own response shape — it is not the same object as /traffic/metrics.
Path parameters
tunnel_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.
Query parameters
hours int
Look-back window in hours. Default
24, max 168 (7 days).Response (200 OK)
tunnel_uuid, endpoint_uuid string (uuid)
Echo of the tunnel's uuid.
endpoint_uuid carries the same value (the route's historical name).hours int
Resolved look-back window (echo).
total_requests, total_bytes number
Request count and total response bytes over the window.
avg_response_time number
Mean response time (ms).
error_rate number
Percentage (0–100) of requests with a 4xx/5xx status.
hourly_data array
Hourly buckets. Each:
{hour, requests, bytes, avg_response_time}. hour is a YYYY-MM-DD HH:00:00 string.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; a value that is neither a uuid nor an integer matches no route).
Request
curl "https://api.ngris.com/v1/traffic/endpoints/019ab73a-b951-7031-aea5-1435da834122/metrics?hours=24" \
-H "X-API-KEY: <your_api_key>"
Python
from ngris import Ngris
client = Ngris(api_key="<your_api_key>")
m = client._get_raw("/traffic/endpoints/019ab73a-b951-7031-aea5-1435da834122/metrics")
print(f"{m['total_requests']} req, err={m['error_rate']:.2f}%")
Response — 200 OK
{
"endpoint_uuid": "019ab73a-b951-7031-aea5-1435da834122",
"tunnel_uuid": "019ab73a-b951-7031-aea5-1435da834122",
"hours": 24,
"total_requests": 12340,
"total_bytes": 7654321,
"avg_response_time": 22.4,
"error_rate": 1.11,
"hourly_data": [
{"hour": "2026-04-29 11:00:00", "requests": 540, "bytes": 334221, "avg_response_time": 19.8},
{"hour": "2026-04-29 12:00:00", "requests": 612, "bytes": 401120, "avg_response_time": 21.3}
]
}
Was this helpful?