Health Check
Section titled “Health Check”The notification server exposes two unauthenticated endpoints for health monitoring and observability. The health check returns a structured status payload suitable for liveness probes, while the metrics endpoint serves Prometheus-formatted counters and gauges for scraping.
GET /api/v1/notifications/health
Section titled “GET /api/v1/notifications/health”Returns the standardized 9-field health response. Unauthenticated. Always returns HTTP 200 with application/json when the service is up.
This endpoint takes no parameters.
curl -X GET "https://proj-abc123-cont-xyz789-n-1.us-east-1.containers.hoody.icu/api/v1/notifications/health"await client.notifications.health.check();{ "status": "ok", "service": "notifications-server", "built": "2024-01-15T10:30:00Z", "started": "2024-01-20T08:15:30Z", "memory": { "rss": 52428800, "heap": 31457280 }, "fds": 12, "pid": 12345, "ip": "10.0.0.5", "userAgent": "hoody-sdk/1.0"}Response fields
| Field | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Health status. Always "ok" when the service is reachable. |
service | string | Yes | Service identifier. |
built | string | No | Executable mtime as RFC3339 string. |
started | string | Yes | Process start time as RFC3339 string. |
memory | object | No | Memory usage metrics. |
memory.rss | integer | Yes | Resident set size in bytes. |
memory.heap | integer | No | Language runtime heap in bytes (null for Rust). |
fds | integer | No | Count of open file descriptors. |
pid | integer | Yes | Process ID. |
ip | string | Yes | Client IP address. |
userAgent | string | No | Client user agent string. |
GET /api/v1/notifications/metrics
Section titled “GET /api/v1/notifications/metrics”Returns server metrics in Prometheus text exposition format. The response body uses text/plain and follows the Prometheus 0.0.4 exposition format, making it directly scrapable by a Prometheus server.
This endpoint takes no parameters.
curl -X GET "https://proj-abc123-cont-xyz789-n-1.us-east-1.containers.hoody.icu/api/v1/notifications/metrics"await client.notifications.health.getMetrics();# HELP notifications_up Service availability# TYPE notifications_up gaugenotifications_up 1# HELP notifications_memory_rss_bytes Resident set size in bytes# TYPE notifications_memory_rss_bytes gaugenotifications_memory_rss_bytes 52428800# HELP notifications_fds_open Open file descriptors# TYPE notifications_fds_open gaugenotifications_fds_open 12# HELP notifications_pid Process ID# TYPE notifications_pid gaugenotifications_pid 12345# HELP notifications_started_at_seconds Process start time as Unix epoch# TYPE notifications_started_at_seconds gaugenotifications_started_at_seconds 1705731330