User Stats

GET /v1/stats/users/{id}

Aggregate stats for the requested user — tunnel/endpoint counts, cumulative and current-period byte/request counters, and the account's effective limits. Calling user can fetch their own ID; admins can fetch any.

Account scope: for non-admin callers the figures are the account aggregate for your active account (not your individual user), subject to your role's permissions. Use switch account to see stats for a different account. Admins fetching a specific user ID get that user's per-user view.

For per-billing-cycle usage (with limits and exceeded flags), use /account/usage. This endpoint focuses on raw cumulative numbers, not quota tracking.

Path parameters

id int64 Req
User ID. Non-admins must pass their own.

Response (200 OK)

user_id int64
Echo.
plan string
Plan slug in effect.
tunnel_count int
Total tunnels.
endpoint_count int
Total endpoints currently owned.
active_tunnels int
Tunnels with at least one active agent.
total_bytes_in, total_bytes_out int64
Cumulative (lifetime) bytes in/out.
total_requests int64
Cumulative (lifetime) request count.
period_bytes_in, period_bytes_out int64
Bytes in/out for the current billing period.
period_requests int64
Request count for the current billing period.
max_endpoints, max_tunnels, max_connections int
Effective plan limits (0 = unlimited).
bandwidth_limit, request_limit int64
Effective per-period bandwidth/request limits (0 = unlimited).
last_updated string (RFC 3339)
When these figures were last refreshed.

Errors

401 Unauthorized
Missing auth.
403 Forbidden
Non-admin trying to fetch another user's stats.
404 Not Found
User doesn't exist (admin path).
Request
curl "https://api.ngris.com/v1/stats/users/1024" \ -H "X-API-KEY: <your_api_key>"
Python
from ngris import Ngris client = Ngris(api_key="<your_api_key>") stats = client._get_raw("/stats/users/1024") print(f"{stats['endpoint_count']} endpoints, {stats['total_requests']:,} requests")
Response — 200 OK
{ "user_id": 1024, "plan": "pro", "tunnel_count": 6, "endpoint_count": 4, "active_tunnels": 2, "total_bytes_in": 61728394, "total_bytes_out": 61728395, "total_requests": 99876, "period_bytes_in": 5242880, "period_bytes_out": 5242881, "period_requests": 8123, "max_endpoints": 25, "max_tunnels": 50, "max_connections": 100, "bandwidth_limit": 107374182400, "request_limit": 0, "last_updated": "2026-04-29T13:00:00Z" }
On this page
User Stats
Iris