Endpoint Health-Check Settings

GET /v1/endpoints/{uuid}/health-check
PUT /v1/endpoints/{uuid}/health-check

Reads and updates the per-endpoint health-check configuration: whether probing is enabled, which path the prober hits, and how often. Probe results are surfaced through GET /v1/endpoints/{uuid}/health.

Health checks are disabled by default. Endpoints opt in by setting enabled = true. Health checks are also HTTP only; the API rejects enable requests for endpoints whose protocol is tcp or udp. They work for tunnel endpoints (served by an agent) and app endpoints (static, managed, full-stack, WordPress and function apps), with the same settings. An app-serving endpoint with no app behind it returns 400 “Health checks need an app or an agent behind this endpoint.”

The probe is an HTTPS GET of path on the endpoint's own hostname (the domain itself for an apex endpoint; an endpoint without a domain is never probed), sent while an agent is connected (tunnel endpoints) or while the app has a live deploy (app endpoints; a paused app records nothing). Healthy = 2xx, 3xx, 401 or 403. The probe follows no redirects, so a redirect counts as up without the target being checked: use a check path that answers directly. It checks the status code only, not the body, from one place. An endpoint is down only after two failed probes in a row (its very first probe decides on its own). On an app endpoint, the app's sign-in and firewall rules don't block the probe; an idle function isn't woken and records asleep, which counts as up; and while the account is over its data-transfer allowance, the probe fails like a visitor's request (429).

Path parameters

uuid string (uuid) Req
Endpoint UUID.

PUT body

All fields are optional. Only fields present in the body are updated — partial updates are supported (no need to send the full document).

enabled boolean
Turn health checks on or off. Setting true on a non-HTTP endpoint returns 400.
path string | null
HTTP path the prober requests. Use one that answers directly (no redirect). Must start with /. Max 255 characters. Send null or empty string to clear (the worker falls back to /).
interval_seconds int
Probe interval, in seconds. Must be in [60, 86400] (1 minute to 1 day). Values outside the range return 400.
notify_on_status_change boolean
Email the user who created the endpoint each time it goes down (two failed probes in a row) and when it comes back up.

Response (200 OK)

Both GET and successful PUT return the current effective configuration, including defaults the worker would apply when the persisted values are NULL.

endpoint_uuid string (uuid)
The endpoint's uuid (the {uuid} in the path).
protocol string
The endpoint's transport. Health-check-eligible values are http, https, unified, or empty (older rows). TCP/UDP endpoints can't be probed (see supported below).
supported boolean
true when the worker can probe this endpoint type (HTTP / HTTPS / unified / null). false for TCP/UDP — clients use this to gate the UI.
enabled boolean
Whether probing is currently turned on.
path string
Effective probe path. Defaults to / when the persisted column is NULL or empty.
interval_seconds int
Effective probe interval. Defaults to 60 when the persisted column is NULL.
min_interval_seconds int
Lower bound the API enforces on interval_seconds (currently 60).
max_interval_seconds int
Upper bound the API enforces on interval_seconds (currently 86400 — 1 day).
notify_on_status_change boolean
Whether a change of the probe verdict is emailed to the user who created the endpoint.

Deprecated: until the sunset this response also carries the legacy integer endpoint_id. Don't use it; read endpoint_uuid.

Propagation latency

Changes take effect within about 30 seconds — the worker reconciles its in-Redis schedule against the database on that cadence. Disabling does not delete the cached "last check" verdict immediately; that ages out after 7 days unless overwritten by a fresh probe.

Errors

400 Bad Request
Validation failed: interval_seconds out of range, path doesn't start with / or exceeds 255 chars, body sets enabled = true on a TCP/UDP endpoint, or no fields were present. Also “Health checks need an app or an agent behind this endpoint.” for an app-serving endpoint with no app.
401 Unauthorized
Missing auth.
403 Forbidden
Endpoint exists but belongs to another user.
404 Not Found
Endpoint doesn't exist.
GET current settings
curl "https://api.ngris.com/v1/endpoints/<uuid>/health-check" \ -H "X-API-KEY: <your_api_key>"
Enable with custom probe path
curl -X PUT "https://api.ngris.com/v1/endpoints/<uuid>/health-check" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{"enabled": true, "path": "/healthz", "interval_seconds": 120}'
Adjust just the interval (partial update)
curl -X PUT "https://api.ngris.com/v1/endpoints/<uuid>/health-check" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{"interval_seconds": 300}'
Disable
curl -X PUT "https://api.ngris.com/v1/endpoints/<uuid>/health-check" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{"enabled": false}'
Response — 200 OK
{ "endpoint_uuid": "019bb1e4-e785-77d2-9966-c3cff31d0a0e", "protocol": "http", "supported": true, "enabled": true, "path": "/healthz", "interval_seconds": 120, "min_interval_seconds": 60, "max_interval_seconds": 86400, "notify_on_status_change": false }
Response — 400 on non-HTTP endpoint
{ "error": "health checks are currently supported for HTTP endpoints only (this endpoint is \"tcp\")" }
Was this helpful?
Was this helpful?