Health Check
GET
/api/health_check
Try Me!
GET /api/health_check
Query Parameters
Response Schema
| Field | Type | Description |
|---|---|---|
| ok | integer | 1 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_checkRequest
This endpoint does not accept any parameters.
Headers
This endpoint accepts a singular optional header.
| Header | Required | Description |
|---|---|---|
Accept | optional | Defaults to application/json |
Response Schema
Success - 200 OK
StatusStatus Object
| Field | Required | Type | Description |
|---|---|---|---|
ok | mandatory | number | 1 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
- MongoDB Connection Issues
- 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
- Unhandled runtime exception
- Application-level failure outside database operations.
Last updated on