Health

The @health endpoint exposes system health information which can be used by upstream services. The format is based on the specification of the Health Check RFC.

Send a GET request to the @health endpoint:

GET /@health HTTP/1.1
Accept: application/json

Or use the client directly:

import { Client } from '@plone/nick';

const cli = Client.initialize({ apiPath: 'http://localhost:8080' });

const { data } = await cli.getHealth({});

The response will contain the health information:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "@id": "http://localhost:8080/@health",
  "status": "pass",
  "checks": {
    "uptime": [
      {
        "componentType": "system",
        "observedValue": 0,
        "observedUnit": "s",
        "status": "pass",
        "time": "2022-04-08T16:00:00.000Z"
      }
    ]
  }
}

This site uses Just the Docs, a documentation theme for Jekyll.