Health Check
Section titled “Health Check”Health check and metrics endpoints for the notification server. These endpoints are unauthenticated and intended for liveness probes, load balancer health checks, and Prometheus scraping.
Health
Section titled “Health”GET /api/v1/notifications/health
Section titled “GET /api/v1/notifications/health”Returns the standardized health response. Always returns HTTP 200 when the service is up.
This endpoint takes no parameters.
curl https://{projectId}-{containerId}-n-1.{server}.containers.hoody.com/api/v1/notifications/healthimport { HoodyClient } from 'hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://{projectId}-{containerId}-n-1.{server}.containers.hoody.com', token: process.env.HOODY_TOKEN });
await client.notifications.kit.getHealth();{ "status": "ok", "service": "notification-server", "built": "2024-01-15T10:30:00Z", "started": "2024-01-20T14:22:33Z", "memory": { "rss": 52428800, "heap": 20971520 }, "fds": 42, "pid": 12345, "ip": "10.0.0.5", "userAgent": "hoody-lb/1.0"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
RATE_LIMIT_EXCEEDED | Rate limit exceeded | Too many requests from your IP address | Wait the number of seconds in the Retry-After header, then retry. Default limits per client IP per minute: 60 for every route, 10 for notify, 100 for icons |
Response fields
Section titled “Response fields”| Name | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Health state. Always "ok" when the service is responding. |
service | string | Yes | Service identifier. |
built | string | No | Executable mtime as an RFC3339 string. |
started | string | Yes | Process start time as an RFC3339 string. |
memory | object | No | Process memory snapshot. |
fds | integer | No | Count of open file descriptors. |
pid | integer | Yes | Process ID. |
ip | string | Yes | IP address the request was received on. |
userAgent | string | No | Client user agent string when available. |
The memory object contains:
| Name | Type | Required | Description |
|---|---|---|---|
rss | integer | Yes | Resident set size in bytes. |
heap | integer | No | Language runtime heap in bytes. null for Rust services. |
Metrics
Section titled “Metrics”GET /api/v1/notifications/metrics
Section titled “GET /api/v1/notifications/metrics”Returns server metrics in Prometheus text exposition format. Suitable for scraping by a Prometheus server or compatible observability backend.
This endpoint takes no parameters.
curl https://{projectId}-{containerId}-n-1.{server}.containers.hoody.com/api/v1/notifications/metricsimport { HoodyClient } from 'hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://{projectId}-{containerId}-n-1.{server}.containers.hoody.com', token: process.env.HOODY_TOKEN });
await client.notifications.kit.getMetrics();# HELP notifications_up Service is up# TYPE notifications_up gaugenotifications_up 1
# HELP notifications_build_info Build information# TYPE notifications_build_info gaugenotifications_build_info{service="notification-server"} 1
# HELP notifications_process_resident_memory_bytes Resident memory size in bytes# TYPE notifications_process_resident_memory_bytes gaugenotifications_process_resident_memory_bytes 52428800
# HELP notifications_process_open_fds Number of open file descriptors# TYPE notifications_process_open_fds gaugenotifications_process_open_fds 42
# 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 1705760553| Error Code | Title | Description | Resolution |
|---|---|---|---|
RATE_LIMIT_EXCEEDED | Rate limit exceeded | Too many requests from your IP address | Wait the number of seconds in the Retry-After header, then retry. Default limits per client IP per minute: 60 for every route, 10 for notify, 100 for icons |
The response body is plain text in the Prometheus exposition format. Each metric includes # HELP and # TYPE lines followed by the metric samples.