The health check endpoint gives you a single, unauthenticated call to confirm that the API server is reachable and that the underlying MongoDB database is connected. It is the first endpoint to call when troubleshooting connectivity or integrating an uptime monitor. The response HTTP status reflects the overall health —Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Pragyat-Nikunj/Learning-Management-System-backend/llms.txt
Use this file to discover all available pages before exploring further.
200 when both the server and database are healthy, 503 when the database is unreachable, and 500 for unexpected internal errors.
Endpoint
GETRequest
No request body, query parameters, or headers are required.Response
200 — Healthy
Returned when the server is running and the database connection is in theconnected ready-state.
Overall system status. Value is
"OK" when healthy.ISO 8601 timestamp of when the check was performed.
Container for individual service statuses.
Example 200 response
503 — Database unhealthy
Returned when MongoDB is unreachable or in a non-connected state. The response body has the same shape as the200 response, but services.databases.status is "unhealthy" and services.databases.details.readyState reflects the actual Mongoose ready-state code.
500 — Internal error
Returned when the health check itself throws an unexpected exception.Value is
"ERROR".ISO 8601 timestamp of when the error occurred.
The error message from the thrown exception.