Skip to content

Latest commit

 

History

History
75 lines (52 loc) · 5.32 KB

File metadata and controls

75 lines (52 loc) · 5.32 KB

Health

Overview

Available Operations

healthcheckHealthcheckGet

Healthcheck

Example Usage

import { GalileoGenerated } from "galileo-generated";

const galileoGenerated = new GalileoGenerated({
  apiKeyHeader: process.env["GALILEOGENERATED_API_KEY_HEADER"] ?? "",
});

async function run() {
  const result = await galileoGenerated.health.healthcheckHealthcheckGet();

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { GalileoGeneratedCore } from "galileo-generated/core.js";
import { healthHealthcheckHealthcheckGet } from "galileo-generated/funcs/healthHealthcheckHealthcheckGet.js";

// Use `GalileoGeneratedCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const galileoGenerated = new GalileoGeneratedCore({
  apiKeyHeader: process.env["GALILEOGENERATED_API_KEY_HEADER"] ?? "",
});

async function run() {
  const res = await healthHealthcheckHealthcheckGet(galileoGenerated);
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("healthHealthcheckHealthcheckGet failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.HealthcheckResponse>

Errors

Error Type Status Code Content Type
errors.GalileoGeneratedDefaultError 4XX, 5XX */*