Endpoint Health
Returns the latest health-check verdict plus rolled-up uptime statistics for an endpoint. The data comes from the platform's background health-check worker, which periodically probes the endpoint's public hostname.
Health checks must first be enabled for the endpoint via PUT /v1/endpoints/{id}/health-check. Endpoints with health checks disabled still respond to this call but the uptime fields will be 0 and last_check will be null.
Path parameters
id string (uuid) Req
Endpoint UUID.
Response (200 OK)
endpoint_id int
Numeric endpoint ID.
has_active_agent boolean
true when at least one tunnel-agent is currently connected for this endpoint. Dashboards typically show "No Agent Connected" instead of the probe verdict when this is false.uptime_24h number
Percentage of probes in the last 24 hours that returned a healthy verdict (0–100, rounded to 2 decimals).
uptime_7d number
Same as
uptime_24h, over the last 7 days.uptime_30d number
Same as
uptime_24h, over the last 30 days.avg_latency_ms number
Mean response time of healthy probes over the last 24 hours, in milliseconds.
last_check object | null
The most recent probe result, or
null when no probes have run yet. Fields: id, status (healthy | unhealthy | error | timeout), status_code (HTTP code, or null on error/timeout), latency_ms, error_message, checked_at.recent_checks array<object>
Up to 50 most-recent probe rows (newest first). Same field shape as
last_check. Used by the admin timeline view; user dashboard ignores this.Caching
Uptime aggregates are cached server-side for ~5 minutes; recent probes appear in last_check within seconds because they go through a separate Redis status cache.
Errors
401 Unauthorized
Missing auth.
403 Forbidden
Endpoint exists but belongs to another user.
404 Not Found
Endpoint doesn't exist.
Request
curl "https://api.ngris.com/v1/endpoints/<uuid>/health" \
-H "X-API-KEY: <your_api_key>"
Response — 200 OK
{
"endpoint_id": 42,
"has_active_agent": true,
"uptime_24h": 99.86,
"uptime_7d": 99.91,
"uptime_30d": 99.78,
"avg_latency_ms": 47.32,
"last_check": {
"id": 18421,
"status": "healthy",
"status_code": 200,
"latency_ms": 41,
"error_message": null,
"checked_at": "2026-05-12T13:00:05Z"
},
"recent_checks": [ ... ]
}
Response — no agent connected
{
"endpoint_id": 42,
"has_active_agent": false,
"uptime_24h": 0,
"uptime_7d": 99.10,
"uptime_30d": 99.50,
"avg_latency_ms": 0,
"last_check": null,
"recent_checks": []
}