2020-01-14 15:57:45 +03:00
.. meta ::
:description: Hasura health API reference
:keywords: hasura, docs, health API, API reference
2019-12-15 16:00:22 +03:00
.. _health_api_reference:
Health check API Reference
==========================
.. contents :: Table of contents
:backlinks: none
:depth: 1
:local:
2020-08-25 14:53:25 +03:00
Introduction
------------
2019-12-15 16:00:22 +03:00
The Health API is a public endpoint which gives info on the server health.
Endpoint
--------
All requests are `` GET `` requests to the `` /healthz `` endpoint.
2021-06-08 17:28:00 +03:00
There's also `` /hasura/healthz `` available as an alternative, which mirrors `` /healthz `` completely.
2019-12-15 16:00:22 +03:00
API Spec
--------
Request
^^^^^^^
.. code-block :: http
GET /healthz HTTP/1.1
Response
^^^^^^^^
Depending on the server health status any of the following responses can be returned:
.. list-table ::
:header-rows: 1
* - Server condition
- HTTP Status
- Message
* - All healthy
- 200
- OK
* - Serving requests but some metadata objects are inconsistent/not-available
- 200
- WARN: inconsistent objects in schema
* - Unhealthy
- 500
- ERROR
.. note ::
2022-01-10 21:39:15 +03:00
If there are metadata inconsistencies, you should use the Hasura console or the :ref: `metadata_get_inconsistent_metadata` metadata API to find out what
2019-12-15 16:00:22 +03:00
the inconsistent objects are and resolve them.
Sample response
***** ***** *****
.. code-block :: http
HTTP/1.1 200 OK
Disabling Health check API
--------------------------
2021-06-08 17:28:00 +03:00
The `` healthz `` API endpoint is public and cannot be disabled.