Skip to main content
Version: v2.x

Healthz Check

Introduction

Hasura provides a Health Check endpoint to monitor the status of the GraphQL API. This is available under the /healthz endpoint for all Hasura Projects (including the OSS GraphQL Engine).

The endpoint also optionally accepts a strict URL parameter whose value should be either true or false. When omitted, the strict parameter assumes a false value.

Usage

Make a GET request to the /healthz endpoint to fetch the status:

curl -XGET https://advanced-hasura.hasura.app/healthz?strict=false

Replace advanced-hasura with your project name.

Response

The returned status could be one of the following:

  • 200, OK - This requires no action. Everything is working as expected.

  • If the Metadata contains any inconsistent objects, the response returned will depend on the provided strict parameter.

    • strict=false or omitted: 200, WARN, inconsistent objects in schema
    • strict=true: 500, ERROR, inconsistent objects in schema

    This requires a review of Metadata since some inconsistent objects have been identified. This usually occurs when there has been a metadata apply command which contained inconsistent objects.

  • 500, ERROR - This means the API is not working and the logs need to be checked.