Endpoint Health-Check Settings

GET /v1/endpoints/{id}/health-check
PUT /v1/endpoints/{id}/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/{id}/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.

Path parameters

id 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. 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.

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_id int
Numeric endpoint ID.
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).

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.
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_id": 42, "protocol": "http", "supported": true, "enabled": true, "path": "/healthz", "interval_seconds": 120, "min_interval_seconds": 60, "max_interval_seconds": 86400 }
Response — 400 on non-HTTP endpoint
{ "error": "health checks are currently supported for HTTP endpoints only (this endpoint is \"tcp\")" }
Iris