Application health check
The health check calls a GET route of your HTTP application every 1 minute and restarts the instance when a failure is confirmed. These routes let you read and change the configuration and list recorded failures. The full behavior is described in Health checks for HTTP projects.
Authentication and permissions
The routes accept an organization API Key (x-api-key: znf_... or Authorization: Bearer znf_...) or a user token with x-organization-id.
| Route | Scope on project:<project-id> | Limit |
|---|---|---|
GET /v1/project/:id/healthcheck | project.read | 100 per minute |
PATCH /v1/project/:id/healthcheck | project.instances.update | 20 every 5 minutes |
GET /v1/project/:id/healthcheck/failures | project.metrics.read | 100 per minute |
owner has full access; assistant, member, and API Keys need the scope for the action. The routes only apply to HTTP projects; other types return 400 with healthcheck is available only for HTTP projects.
Read the configuration
GET /v1/project/:id/healthcheck{
"status": "success",
"data": {
"available": true,
"healthcheck": { "enabled": true, "path": "/health" },
"interval_seconds": 60,
"retention_days": 30
}
}| Field | Description |
|---|---|
available | true when the project plan includes health checks. Same value as capabilities.healthcheck in GET /v1/project/plans |
healthcheck.enabled | Whether the check is active |
healthcheck.path | Checked route. Projects that never configured the feature return { "enabled": false, "path": "/health" } |
interval_seconds | Interval between checks (fixed at 60) |
retention_days | Period during which failures remain available (fixed at 30) |
Enable, change, or disable
PATCH /v1/project/:id/healthcheck| Field | Type | Required | Description |
|---|---|---|---|
healthcheck.enabled | boolean | Yes | true enables; false disables |
healthcheck.path | string | With enabled: true | Absolute path from 1 to 256 characters, starting with a single /, without domain, query string, or fragment |
{
"healthcheck": {
"enabled": true,
"path": "/health"
}
}The response confirms the applied configuration:
{
"status": "success",
"data": {
"healthcheck": { "enabled": true, "path": "/health" },
"interval_seconds": 60,
"retention_days": 30
}
}To disable, send { "healthcheck": { "enabled": false } }. The last configured route is kept and the failure history remains available. Disabling is allowed on any plan; enabling requires a plan with the feature.
| Code | Situation |
|---|---|
400 | Invalid body, path in the wrong format, project that is not HTTP, or plan not found |
403 | Plan without health check (HEALTHCHECK_NOT_AVAILABLE_FOR_PLAN) or insufficient scope |
404 | Project not found (project not exists) |
429 | Rate limit exceeded |
List failures
GET /v1/project/:id/healthcheck/failures?page=1&limit=50| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page, starting at 1 |
limit | integer | 50 | Items per page, from 1 to 100 |
{
"status": "success",
"data": {
"failures": [
{ "occurred_at": "2026-10-08T12:03:00.000Z", "status_code": 503 }
],
"pagination": { "page": 1, "limit": 50, "total": 1, "total_pages": 1 },
"retention_days": 30
}
}Failures are sorted from newest to oldest and only cover the last 30 days. status_code is the HTTP status returned by the application and is absent when there was no response, such as a timeout or connection failure.
Example
curl -X PATCH "https://api.zenifra.com/v1/project/6650f1a2b3c4d5e6f7a8b9c0/healthcheck" \
-H "x-api-key: znf_..." \
-H "Content-Type: application/json" \
-d '{"healthcheck": {"enabled": true, "path": "/health"}}'Next steps
- Check which plans include the feature in the catalog.
- Enable the health check at creation with
config.healthcheckin Create, list, and delete projects. - Investigate failures with Metrics and Logs.
- Set up email alerts for the application.
Last updated on