-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add dedicated version and health api docs pages (#3482)
- Loading branch information
Showing
3 changed files
with
118 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
.. _health_api_reference: | ||
|
||
Health check API Reference | ||
========================== | ||
|
||
.. contents:: Table of contents | ||
:backlinks: none | ||
:depth: 1 | ||
:local: | ||
|
||
The Health API is a public endpoint which gives info on the server health. | ||
|
||
Endpoint | ||
-------- | ||
|
||
All requests are ``GET`` requests to the ``/healthz`` endpoint. | ||
|
||
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 | ||
`get_inconsistent_metadata <schema-metadata-api/manage-metadata.html#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
.. _version_api_reference: | ||
|
||
Version API Reference | ||
===================== | ||
|
||
.. contents:: Table of contents | ||
:backlinks: none | ||
:depth: 1 | ||
:local: | ||
|
||
|
||
The ``/v1/version`` is a public endpoint that responds with the current server version in JSON format. | ||
|
||
Endpoint | ||
-------- | ||
|
||
All requests are ``GET`` requests to the ``/v1/version`` endpoint. | ||
|
||
API Spec | ||
-------- | ||
|
||
Request | ||
^^^^^^^ | ||
|
||
.. code-block:: http | ||
GET /v1/version HTTP/1.1 | ||
Sample response | ||
^^^^^^^^^^^^^^^ | ||
|
||
.. code-block:: http | ||
HTTP/1.1 200 OK | ||
Content-Type: application/json | ||
{ | ||
"version": "v1.0.0-alpha01" | ||
} | ||
Disabling Version API | ||
--------------------- | ||
|
||
The ``version`` API endpoint is public and cannot be disabled. |