Healthcheck Endpoint
Patriot exposes a healthcheck endpoint that can be polled by external monitoring tools to determine overall system health.
The healthcheck endpoint is part of the Patriot REST API. See ICA Setup for information on enabling ICA and the REST API.
Configuration
The healthcheck endpoint is disabled by default. To enable it, set Enabled to true in the HealthChecks section of the Data Service configuration file, and set ApiKey to the key that callers must supply.
{
"DataService": {
"HealthChecks": {
"Enabled": true,
"ApiKey": "your-api-key"
}
}
}
See Data Service Configuration for more details.
Endpoint
GET /health
Authentication
The request must include an X-Api-Key header containing a valid API key.
GET /health HTTP/1.1
X-Api-Key: your-api-key
Response
| Status Code | Body | Meaning |
|---|---|---|
200 OK | healthy | The system is operating normally |
401 Unauthorized | The X-Api-Key header is missing or contains an invalid key | |
404 Not Found | Health checks are not enabled (Enabled is false or not set) | |
503 Service Unavailable | unhealthy | The system has detected a problem |