Health Check
Section titled “Health Check”These endpoints provide health and observability information for the notification server. The health check returns a standardized response describing service status, runtime metadata, and resource usage, while the metrics endpoint exposes Prometheus-compatible telemetry data. Use these endpoints for liveness probes, monitoring dashboards, and alerting pipelines.
Service health
Section titled “Service health”GET /api/v1/notifications/health
Section titled “GET /api/v1/notifications/health”Returns the standardized 9-field health response. This endpoint is unauthenticated and always returns HTTP 200 with application/json when the service is reachable.
This endpoint takes no parameters.
curl -X GET https://api.hoody.com/api/v1/notifications/healthconst result = await client.notifications.health.check();{ "status": "ok", "service": "notifications", "built": "2024-11-15T08:22:10Z", "started": "2025-01-20T14:03:55Z", "memory": { "rss": 48234496, "heap": 20971520 }, "fds": 128, "pid": 4711, "ip": "10.0.4.17", "userAgent": "Hoody-HealthProbe/1.0"}Response fields
Section titled “Response fields”| Field | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Service health status. Always "ok" when reachable. |
service | string | Yes | Service identifier. |
built | string | No | Executable mtime as RFC3339 string. May be null. |
started | string | Yes | Process start time as RFC3339 string. |
memory | object | No | Runtime memory usage. May be null. |
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. May be null. |
pid | integer | Yes | Process identifier. |
ip | string | Yes | Local IP address of the process. |
userAgent | string | No | User-Agent header from the request. May be null. |
Prometheus metrics
Section titled “Prometheus metrics”GET /api/v1/notifications/metrics
Section titled “GET /api/v1/notifications/metrics”Returns server metrics in Prometheus text exposition format. This endpoint is unauthenticated and intended for scraping by a Prometheus server or compatible observability backend.
This endpoint takes no parameters.
curl -X GET https://api.hoody.com/api/v1/notifications/metricsconst result = await client.notifications.health.getMetrics();# HELP notifications_up Whether the service is up (1) or down (0)# TYPE notifications_up gaugenotifications_up 1# HELP notifications_process_start_time_seconds Start time of the process since unix epoch in seconds# TYPE notifications_process_start_time_seconds gaugenotifications_process_start_time_seconds 1737381835# HELP notifications_process_resident_memory_bytes Resident memory size in bytes# TYPE notifications_process_resident_memory_bytes gaugenotifications_process_resident_memory_bytes 48234496# HELP notifications_open_fds Number of open file descriptors# TYPE notifications_open_fds gaugenotifications_open_fds 128