0 people focusing right now

GET /api/health

Check API service health and status

Simple health check endpoint to verify API availability and database connectivity.

Perfect for: App startup checks, monitoring systems, and connection troubleshooting.
Endpoint URL
GET https://game.regardingwork.com/api/health
Authentication
None required

📤 Request

No headers or request body required - This is a simple GET endpoint

✅ Response (200 OK)

{
  "status": "healthy",
  "message": "RegardingWork Game API is running",
  "version": "2.1.0",
  "timestamp": "2025-08-24T15:30:45Z",
  "database": "connected",
  "services": {
    "authentication": "operational",
    "session_tracking": "operational",
    "slack_integration": "operational",
    "analytics": "operational"
  },
  "uptime": "72 hours, 15 minutes"
}

❌ Error Response (503 Service Unavailable)

{
  "status": "unhealthy",
  "message": "Service temporarily unavailable",
  "timestamp": "2025-08-24T15:30:45Z",
  "issues": [
    "Database connection failed",
    "Slack integration offline"
  ]
}

💻 Code Examples

JavaScript (Fetch) - App Startup Check
async function checkAPIHealth() {
  try {
    const response = await fetch('https://game.regardingwork.com/api/health');
    const health = await response.json();
    
    if (health.status === 'healthy') {
      console.log('✅ API is healthy, ready to sync');
      return true;
    } else {
      console.warn('⚠️ API health issues:', health.issues);
      return false;
    }
  } catch (error) {
    console.error('❌ Cannot reach API:', error.message);
    return false;
  }
}

// Use in app initialization
const apiReady = await checkAPIHealth();
if (apiReady) {
  // Proceed with authentication and sync
} else {
  // Show offline mode or retry prompt
}
cURL - Quick Terminal Check
curl https://game.regardingwork.com/api/health

🎯 Common Use Cases

App Development
  • Startup connectivity check
  • Network troubleshooting
  • Offline mode detection
  • Connection retry logic
Monitoring & DevOps
  • Uptime monitoring systems
  • Load balancer health checks
  • Service dependency verification
  • Performance baseline testing

🔗 Related Endpoints

After Health Check
Monitoring