Health Check

The health endpoint provides system status information and is useful for monitoring and uptime checks.

Get System Health

GET /api/health

Response

Returns the current system status and metadata.

Success Response (200)

{
  "data": {
    "status": "healthy",
    "timestamp": "2024-01-15T10:30:00.000Z",
    "uptime": 3600.5,
    "version": "1.0.0",
    "environment": "development"
  },
  "success": true,
  "meta": {
    "timestamp": "2024-01-15T10:30:00.000Z"
  }
}

Response Fields

Field Type Description
status string Current system status (always "healthy" if responding)
timestamp string ISO 8601 timestamp of the response
uptime number Server uptime in seconds
version string API version
environment string Current environment (development/production)

Example Usage

# cURL
curl https://beta-api.introzy.com/api/health

# JavaScript
const response = await fetch('https://beta-api.introzy.com/api/health');
const health = await response.json();
console.log('API Status:', health.data.status);

# Python
import requests
response = requests.get('https://beta-api.introzy.com/api/health')
health = response.json()
print(f"API Status: {health['data']['status']}")

Use Cases

  • Monitoring: Check if the API is responding
  • Load Balancer: Health check endpoint for load balancers
  • Debugging: Verify API connectivity and get environment info
  • Uptime Tracking: Monitor service availability