[READ-ONLY] Mirror of https://github.com/openstatusHQ/sdk-node. SDK for openstatus www.openstatus.dev
sdk-node docs health-service.md
595 B
Markdown

← Back to index

Health Service #

Check API health status. No authentication required.

import { openstatus, ServingStatus } from "@openstatus/sdk-node";

const { status } = await openstatus.health.v1.HealthService.check({});
console.log(ServingStatus[status]); // "SERVING"

Or with a configured client:

import { createOpenStatusClient, ServingStatus } from "@openstatus/sdk-node";

const client = createOpenStatusClient();
const { status } = await client.health.v1.HealthService.check({});
console.log(ServingStatus[status]); // "SERVING"