Skip to Content

Health Check


GET

/api/health_check


Try Me!

GET /api/health_check

Query Parameters

Response Schema

FieldTypeDescription
okinteger1 if good

Summary

Returns the status of the backend and whether it is ready to service queries.


Description

The Health Check API provides a basic health check.

Key characteristics of this endpoint:

  • Publicly accessible (no authentication required)
  • No query parameters or request body
  • Clear separation between database errors and unexpected server failures

Endpoint

GET /api/health_check

Request

This endpoint does not accept any parameters.

Headers

This endpoint accepts a singular optional header.

HeaderRequiredDescription
AcceptoptionalDefaults to application/json

Response Schema

Success - 200 OK

Status
Status Object
FieldRequiredTypeDescription
okmandatorynumber1 if all is fine
Example Response
{ "ok": 1 }

Error Codes & Response Types

503 Service Unavailable

Returned when the database is temporarily unavailable, or a query fails due to a database issue

Response Body
{ "detail" : "Database temporarily unavailable" }
Typical Causes
  1. MongoDB Connection Issues
  2. Database timeout or query failure for a non-general reason

500 Internal Server Error

Returned when an unexpected server-side error occurs.

Response Body
{ "detail" : "Internal server error" }
Typical Causes
  1. Unhandled runtime exception
  2. Application-level failure outside database operations.

Last updated on