Overview
The health check endpoint allows you to verify API connectivity and get API version information.Endpoint
Health Check
Check API health and status. Endpoint:GET /v1/health
Request:
200 OK
status:string- ‘healthy’ or ‘degraded’api:string- API nameversion:string- API version
Examples
Basic Health Check
Connection Test
Use health check to test connectivity:Application Startup Check
Verify API connectivity during application initialization:Monitoring Script
Continuous health monitoring:Status Values
healthy
API is operating normally
degraded
API is experiencing issues but still operational
Best Practices
Test on Startup
Test on Startup
Perform a health check when your application starts to verify connectivity
Include in Monitoring
Include in Monitoring
Add health checks to your monitoring and alerting systems
Handle Degraded Status
Handle Degraded Status
Implement graceful degradation when API status is ‘degraded’
Don't Poll Too Frequently
Don't Poll Too Frequently
Health checks are lightweight but shouldn’t be called excessively (every 30-60s is reasonable)
Error Handling
Connection Error
Cannot reach the API server:- Check network connectivity
- Verify base URL is correct
- Check firewall/proxy settings
Authentication Error
Invalid or missing API key:401 Unauthorized
- Verify your API key is correct
- Check that
BREAD_API_KEYenvironment variable is set - Ensure API key has proper permissions
Timeout Error
API is slow or unresponsive: Response: Request timeout Troubleshooting:- API may be experiencing high load
- Check API status page
- Retry after a few seconds
Response Type
HealthCheckResponse
status:string- ‘healthy’ or ‘degraded’api:string- API nameversion:string- API version