Overview
The health check endpoint provides a simple way to verify that the MediGuide API is running and can successfully connect to the database. This endpoint executes a basic database query to ensure connectivity and returns the current database timestamp.Endpoint
Request
GET
Response
Status message indicating database connection status
Database timestamp object containing the current time from the database server
Success Response
200 - Success
Error Response
500 - Internal Server Error
Implementation
The health check endpoint executes a simple SQL query to verify database connectivity:Use Cases
System Monitoring
Integrate this endpoint into your monitoring systems to track API uptime and database availability:Load Balancer Health Checks
Configure your load balancer to use this endpoint for health verification:Troubleshooting
When debugging connectivity issues, check this endpoint first to isolate whether the problem is with the API server or database:- API returns 200 with timestamp - System is healthy
- API returns 500 with error - Database connection issue
- No response - API server is down or unreachable
