Skip to main content
GET
/
v1
/
health
Health Check
curl --request GET \
  --url https://api.example.com/v1/health
{
  "status": "<string>",
  "checks": {}
}

Overview

Health check endpoints for monitoring API availability and dependency status. Endpoints:
  • GET /v1/health - Basic health check
  • GET /v1/health/live - Liveness probe (process running)
  • GET /v1/health/ready - Readiness probe (dependencies healthy)

Basic Health Check

GET /v1/health

Simple health check that returns immediately if the API is running. Response:
{
  "status": "healthy"
}

Liveness Probe

GET /v1/health/live

Kubernetes liveness probe - confirms the process is running and responsive. Use Case: Restart container if process is hung or crashed Response:
{
  "status": "alive"
}

Readiness Probe

GET /v1/health/ready

Kubernetes readiness probe - checks critical dependencies before routing traffic. Dependencies Checked:
  • Postgres (critical): Database connectivity and query performance
  • Redis (informational): Cache and pub/sub availability
  • Temporal (informational): Workflow engine status
Status Codes:
  • 200 OK: All critical dependencies healthy (ready for traffic)
  • 503 Service Unavailable: Critical dependencies unhealthy (not ready)
Response Fields:
status
string
required
Overall readiness status: ready or not_ready
checks
object
required
Individual dependency health checks

Example Requests

curl https://api.airweave.ai/v1/health

Example Responses

Healthy System

{
  "status": "ready",
  "checks": {
    "postgres": {
      "status": "up",
      "latency_ms": 1.23,
      "error": null
    },
    "redis": {
      "status": "up",
      "latency_ms": 0.45,
      "error": null
    },
    "temporal": {
      "status": "up",
      "latency_ms": 2.1,
      "error": null
    }
  }
}

Unhealthy System

{
  "status": "not_ready",
  "checks": {
    "postgres": {
      "status": "down",
      "latency_ms": null,
      "error": "Connection refused"
    },
    "redis": {
      "status": "up",
      "latency_ms": 0.52,
      "error": null
    },
    "temporal": {
      "status": "skipped",
      "latency_ms": null,
      "error": null
    }
  }
}

Kubernetes Configuration

livenessProbe:
  httpGet:
    path: /v1/health/live
    port: 8000
  initialDelaySeconds: 30
  periodSeconds: 10
  timeoutSeconds: 5
  failureThreshold: 3

readinessProbe:
  httpGet:
    path: /v1/health/ready
    port: 8000
  initialDelaySeconds: 10
  periodSeconds: 5
  timeoutSeconds: 3
  failureThreshold: 2

Debug Mode

When DEBUG=true in settings, the readiness endpoint includes additional diagnostic information.

Monitoring

Use these endpoints for:
  • Kubernetes health probes: Automatic container restart and traffic routing
  • Load balancer health checks: Remove unhealthy instances from pool
  • Uptime monitoring: Track API availability over time
  • Dependency monitoring: Alert on database or cache issues