mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-24 16:03:37 +03:00
b83ba51fa3
GitOrigin-RevId: 9fdd953173643f88a64f44efc345a3a7da061ec1
75 lines
1.4 KiB
ReStructuredText
75 lines
1.4 KiB
ReStructuredText
.. meta::
|
|
:description: Hasura health API reference
|
|
:keywords: hasura, docs, health API, API reference
|
|
|
|
.. _health_api_reference:
|
|
|
|
Health check API Reference
|
|
==========================
|
|
|
|
.. contents:: Table of contents
|
|
:backlinks: none
|
|
:depth: 1
|
|
:local:
|
|
|
|
Introduction
|
|
------------
|
|
|
|
The Health API is a public endpoint which gives info on the server health.
|
|
|
|
Endpoint
|
|
--------
|
|
|
|
All requests are ``GET`` requests to the ``/healthz`` endpoint.
|
|
There's also ``/hasura/healthz`` available as an alternative, which mirrors ``/healthz`` completely.
|
|
|
|
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::
|
|
|
|
If there are metadata inconsistencies, you should use the Hasura console or the :ref:`get_inconsistent_metadata <get_inconsistent_metadata>` API to find out what
|
|
the inconsistent objects are and resolve them.
|
|
|
|
|
|
Sample response
|
|
***************
|
|
|
|
.. code-block:: http
|
|
|
|
HTTP/1.1 200 OK
|
|
|
|
|
|
Disabling Health check API
|
|
--------------------------
|
|
|
|
The ``healthz`` API endpoint is public and cannot be disabled.
|