> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/sdks/backend-sdk/finger/technical_documentation/api_reference/management/health-check.md).

# Health check

Checks the license and, when it is valid, runs an active health check of the internal fingerprint processing components on every call, and updates the health snapshot that `GET /api/v1/finger/metrics` publishes.

* The response is always HTTP `200` once the service is initialized. `message` is `Healthy` when the license is valid and the check succeeded, and `Unhealthy` otherwise.
* When the license is not valid, the processing components are not checked and `engine` keeps the result of the previous check.
* On `master` nodes the check applies the retries configured in `engine_max_retries` and `engine_retry_delay`, so a failing check can take several seconds: take it into account when setting probe timeouts.
* It never requires a JWT.

```json
{"openapi":"3.0.1","info":{"title":"Facephi Finger Service REST API","version":"2.2.1"},"tags":[{"name":"Management","description":"Version, health, operational metrics and runtime configuration of the service."}],"servers":[{"url":"http://127.0.0.1:6982/"}],"security":[],"paths":{"/api/v1/finger/health":{"get":{"summary":"Health check","description":"Checks the license and, when it is valid, runs an active health check of the internal fingerprint processing\ncomponents on every call, and updates the health snapshot that `GET /api/v1/finger/metrics` publishes.\n\n- The response is always HTTP `200` once the service is initialized. `message` is `Healthy` when the\n  license is valid and the check succeeded, and `Unhealthy` otherwise.\n- When the license is not valid, the processing components are not checked and `engine` keeps the result\n  of the previous check.\n- On `master` nodes the check applies the retries configured in `engine_max_retries` and\n  `engine_retry_delay`, so a failing check can take several seconds: take it into account when setting probe\n  timeouts.\n- It never requires a JWT.\n","operationId":"getHealth","tags":["Management"],"responses":{"200":{"description":"Health status of the service.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}},"400":{"description":"The service is not initialized (`Service not initialized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResult"}}}}}}}},"components":{"schemas":{"HealthResponse":{"type":"object","properties":{"message":{"type":"string","description":"`Healthy` when the license is valid and the last health check succeeded; `Unhealthy` otherwise. The\nresponse is always HTTP `200`: check `message`, `license.valid` and `engine.healthy`.\n","enum":["Healthy","Unhealthy"]},"initialized":{"type":"boolean","description":"Always `true` once the service is initialized."},"license":{"$ref":"#/components/schemas/LicenseStatus"},"engine":{"$ref":"#/components/schemas/HealthEngine"}},"required":["message","initialized","license","engine"]},"LicenseStatus":{"type":"object","description":"Status of the service license.","properties":{"valid":{"type":"boolean","description":"Whether the service currently holds a valid license. This is the field to check."},"statusCode":{"type":"string","description":"Status code reported by the licensing layer, for example `LA_OK`, `LF_OK`, `OK` or an error code."},"statusMessage":{"type":"string","description":"Human-readable description of `statusCode`. `The license is valid.` when the license is valid."}},"required":["valid","statusCode","statusMessage"]},"HealthEngine":{"type":"object","description":"State of the internal fingerprint processing components, as observed by the last health check. On `master`\nnodes the check asks the processing components whether all of them are registered; on `worker` nodes it\nchecks that every locally configured processing service is accepting connections.\n","properties":{"initialized":{"type":"boolean","description":"Always `true` once the service is initialized."},"healthy":{"type":"boolean","description":"Result of the last health check. `false` until the first check runs."},"role":{"type":"string","description":"Node role (`master` or `worker`).","enum":["master","worker"]},"lastHealthKnown":{"type":"boolean","description":"Whether a health check has already run since the service started."},"lastHealthCheckAt":{"type":"string","description":"UTC instant of the last health check (`YYYY-MM-DDTHH:MM:SSZ`); empty until the first check runs."},"lastError":{"type":"string","description":"Reason of the last failed health check; empty when the last check succeeded."},"servicesConfigured":{"type":"array","description":"Processing services configured on this node (`FACEPHI_FINGER_ENGINE_SERVICES`).","items":{"type":"string"}}},"required":["initialized","healthy","role","lastHealthKnown","lastHealthCheckAt","lastError","servicesConfigured"]},"BadRequestResult":{"type":"object","properties":{"status":{"type":"integer"},"error":{"type":"string"},"message":{"type":"string"},"timeStamp":{"$ref":"#/components/schemas/TimeStamp"}},"required":["status","error","message","timeStamp"]},"TimeStamp":{"type":"string","description":"UTC date and time in ISO-8601 format with second precision (`YYYY-MM-DDTHH:MM:SSZ`)."}}}}
```
