Skip to content

Health

The health endpoint provides API status information and is useful for monitoring and debugging.

GET /api/v1/health

Returns the current health status of the API.

None required.

Terminal window
curl https://app.bitmarks.sh/api/v1/health

Status: 200 OK

{
"name": "@bitmarks.sh/api",
"version": "2.0.0-alpha",
"environment": "production",
"status": "healthy",
"timestamp": "2025-01-15T12:00:00.000Z"
}
FieldTypeDescription
namestringAPI package name
versionstringAPI version
environmentstringCurrent environment (development, staging, production)
statusstringHealth status (healthy, degraded, unhealthy)
timestampstringISO 8601 timestamp of the response
StatusDescription
healthyAll systems operational
degradedSome features may be unavailable
unhealthyMajor issues, limited functionality
  • Monitoring: Set up health checks in your monitoring system
  • Load Balancers: Use as health check endpoint for load balancers
  • Debugging: Verify API connectivity and version
async function checkAPIHealth() {
try {
const response = await fetch('https://app.bitmarks.sh/api/v1/health');
const health = await response.json();
if (health.status !== 'healthy') {
console.warn('API is not healthy:', health.status);
}
return health;
} catch (error) {
console.error('Failed to reach API:', error);
return { status: 'unreachable' };
}
}