Top Endpoints by Traffic
Endpoints (tunnels) ranked by traffic volume in the chosen window. Used in the dashboard to surface "which apps are getting hit?" without manually clicking through each endpoint. Ranks by request count by default; switch via the metric parameter. Aggregated across the active account.
Query parameters
metric string
Rank-by metric:
requests (default) or bytes. Any other value returns 400.limit int
How many to return. Default
10, max 100.days int
Look-back window in days. Default
7, max 365.Response (200 OK)
metric, days string / int
Resolved rank-by metric and look-back window (echo).
endpoints array
Endpoints (tunnels) in rank order;
[] when there was no traffic in the window. Each: {uuid, name, type, public_url, status, subdomain, domain, total_requests, total_bytes, success_requests, error_requests, success_rate, error_rate, avg_response_time, last_request_at}, where uuid is the tunnel's uuid (see GET /v1/tunnels/{uuid}). success_rate / error_rate are percentages (0–100).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
Invalid
metric (must be requests or bytes).401 Unauthorized
Missing auth.
Request — top 5 by bytes
curl "https://api.ngris.com/v1/traffic/top-endpoints?limit=5&metric=bytes" \
-H "X-API-KEY: <your_api_key>"
Python
from ngris import Ngris
client = Ngris(api_key="<your_api_key>")
top = client._get_raw("/traffic/top-endpoints", params={"limit": 5})
for ep in top["endpoints"]:
print(f"{ep['name']:<20} {ep['total_requests']:>8} req {ep['error_rate']:.2f}%")
Response — 200 OK
{
"metric": "requests",
"days": 7,
"endpoints": [
{"uuid": "019ab73a-b951-7031-aea5-1435da834122", "name": "myapp", "type": "http", "public_url": "myapp.example.com",
"status": "active", "subdomain": "myapp", "domain": "example.com",
"total_requests": 12340, "total_bytes": 8888888,
"success_requests": 12337, "error_requests": 3,
"success_rate": 99.98, "error_rate": 0.02,
"avg_response_time": 47.2, "last_request_at": "2026-04-29T12:58:03Z"},
{"uuid": "019ab81b-04aa-75eb-9914-ede846e5d7cf", "name": "api", "type": "http", "public_url": "api.example.com",
"status": "active", "subdomain": "api", "domain": "example.com",
"total_requests": 9870, "total_bytes": 4444444,
"success_requests": 9858, "error_requests": 12,
"success_rate": 99.88, "error_rate": 0.12,
"avg_response_time": 61.8, "last_request_at": "2026-04-29T12:59:41Z"}
]
}
Was this helpful?