Health Check

Check if the API is running and healthy.
GET /health

No Authentication Required

This endpoint is public and doesn’t require authentication.

Example Request

curl https://api.agentwarden.io/health

Response

Status: 200 OK
{
  "status": "healthy",
  "timestamp": "2024-02-21T10:30:00Z",
  "version": "1.0.0"
}

Use Cases

Monitoring

Use this endpoint for:
  • Uptime monitoring (Pingdom, UptimeRobot, etc.)
  • Load balancer health checks
  • Service status verification

Example with cURL

# Simple health check
curl -f https://api.agentwarden.io/health || echo "API is down!"

# Check response time
curl -w "Time: %{time_total}s\n" -o /dev/null -s https://api.agentwarden.io/health

Example Monitoring Script

import requests
import time

def check_api_health():
    try:
        response = requests.get('https://api.agentwarden.io/health', timeout=5)
        
        if response.status_code == 200:
            data = response.json()
            print(f"✅ API is healthy - {data['status']}")
            return True
        else:
            print(f"❌ API returned {response.status_code}")
            return False
            
    except requests.exceptions.Timeout:
        print("❌ API timeout")
        return False
    except Exception as e:
        print(f"❌ Error: {e}")
        return False

# Run every 60 seconds
while True:
    check_api_health()
    time.sleep(60)

Status Page

For real-time API status and incident reports, visit: status.agentwarden.io