Overview
The Meta-Data Tag Generator API provides two endpoints for monitoring service health and availability. These endpoints are essential for deployment verification, uptime monitoring, and ensuring the API is operational.GET /api/health
Comprehensive health check endpoint that returns detailed service status, version information, and a confirmation message.Use Cases
- Deployment Verification: Confirm successful deployment after updates
- Monitoring Systems: Integrate with health check monitoring tools (Datadog, New Relic, etc.)
- Load Balancer Health Checks: Configure load balancers to verify backend availability
- Frontend Status Checks: Verify API connectivity before making requests
Request
Response
Current health status of the API. Returns
"healthy" when operational.Current API version. Example:
"1.0.0"Human-readable confirmation message. Returns
"Document Meta-Tagging API is running"Response Example
Response Codes
API is running and healthy
Service error (endpoint should always return 200 if reachable)
GET /api/status
Simple status check endpoint for quick API availability verification. Returns minimal response for basic health checks.Use Cases
- Quick Health Checks: Lightweight ping to verify API is responding
- Simple Monitoring: Basic uptime monitoring without detailed information
- Container Health Checks: Docker/Kubernetes liveness probes
- API Gateway Health: Lightweight checks for API gateway routing
Request
Response
Simple status indicator. Returns
"ok" when operational.Service identifier. Returns
"document-meta-tagging-api"Response Example
Response Codes
API is responding normally
Service error (endpoint should always return 200 if reachable)
Health vs Status
| Feature | /api/health | /api/status |
|---|---|---|
| Response Size | Detailed | Minimal |
| Version Info | Yes | No |
| Message | Descriptive | None |
| Use Case | Comprehensive monitoring | Quick availability check |
| Recommended For | Production monitoring, deployment verification | Container health probes, lightweight checks |
Frontend Integration
The health endpoint is used in the frontend API client:Monitoring Best Practices
1. Configure Health Check Intervals
2. Set Up Uptime Monitoring
Monitor the/api/health endpoint with services like:
- Uptime Robot: Free tier supports 50 monitors
- Pingdom: Advanced monitoring with alerting
- Datadog: Full observability and APM
- New Relic: Application performance monitoring
3. Load Balancer Configuration
4. Kubernetes Liveness Probe
Troubleshooting
Health Check Fails
If health checks are failing:-
Verify API is Running
-
Check Service Logs
-
Test Network Connectivity
-
Verify Port Binding
Intermittent Health Check Failures
Common causes:- High CPU/Memory Usage: Service is overwhelmed
- Network Latency: Timeout too aggressive
- Cold Start: Container/service still initializing
- Rate Limiting: Too many health check requests