API health check
This article describes the health check functionality of the PORTOS API.
get
{{server_adddress}}
/api/v2/health
Get health check
The response HTTP status is always 200 for all health report status values.

Response payload

The response payload is based on Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions library and consists of following classes:

Health report

The response payload is represented by HealthReport class, which contains following properties:
Property
Description
status
Represents the aggregate status of all the health checks. The value is most servere status reported by a health check. If no checks were executed, the value is always healthy. Status is equal to one of following HealthStatus enumeration values: healthy, degraded and unhealthy.
totalDuration
Time the health check service took to execute.
entries
Dictionary map with each executed health check. The keys in this dictionary map the name of each executed health check to a health report data (represented by HealthReportEntry class) returned from the corresponding health check.

Health report entry

The values in health report entries dictionary map are represented by the HealthReportEntry class, which contains following properties:
Property
Description
status
Health status of the specific health check. Status is equal to one of following HealthStatus enumeration values: healthy, degraded and unhealthy.
duration
Health check execution duration.
description
Optional human-readable description of the status of the component that was checked.
data
Additional key-value pairs describing the health of the component. Structure may vary for each health check.
exception
Optional exception object representing the exception that was thrown when checking for status (if any). Equal to null when status is healthy.

Health check result

Some health checks contains collection of inner health checks. Each element of such collection is represented by the HealthCheckResut class, which contains following properties:
Property
Description
status
Health status of the specific health check. Status is equal to one of following HealthStatus enumeration values: healthy, degraded and unhealthy.
description
Optional human-readable description of the status of the component that was checked.
data
Additional key-value pairs describing the health of the component. Structure may vary for each health check.
exception
Optional exception object representing the exception that was thrown when checking for status (if any). Equal to null when status is healthy.

Health checks

The health report entries dictionary contains information returned from following health checks:

License health check

License health check is associated with the license identifier. License health check verifies expiration date of product license. Following table explains relationship between remaining license days and health status of license health check.
Health status
Remaining license days
healthy
More than 14
degraded
Up to 14
unhealthy
0
The data section contains following values:
Property name
Description
remainingDays
The number of days to license expiration.
expirationDate
The license expiration date (in iso 8601 format).
The keys may not be present, if exception property of license health report entry is set.

Fiscal printers health check

Fiscal printers health check is associated with the fiscalPrinters identifier. Checks health of every fiscal device marked as active.
The data section contains following values:
Property name
Description
entries
The collection of FiscalPrintersHealthCheckResultEntry. Each element represents health check result for one fiscal device.
The FiscalPrintersHealthCheckResultEntry class contains following properties:
Property name
Description
Key
The unique fiscal name.
Result
The data describing the health of fiscal device, represented by HealthCheckResult class.

Order endpoints health check

Order endpoints health check is associated with the orderEndpoints identifier. Checks health of every order endpoint device marked as active.
The data section contains following values:
Property name
Description
entries
The collection of OrderEndpointsHealthCheckResultEntry. Each element represents health check result for one order endpoint device.
The OrderEndpointsHealthCheckResultEntry class contains following properties:
Property name
Description
Key
The unique order endpoint name.
Result
The data describing the health of order endpoint device, represented by HealthCheckResult class.
Last modified 5mo ago