API Reference

Health Checks

Liveness and readiness probes for Kubernetes deployments and load balancer health checks.

The API Gateway exposes standard health check endpoints compatible with Kubernetes probes and common load balancers. All health endpoints are public — no authentication required.

Endpoints

MethodEndpointPurposeLatency Target
GET/health/liveKubernetes liveness probe — process is alive< 5ms
GET/health/readyKubernetes readiness probe — all deps healthy< 50ms

GET /health/live — Liveness Probe

Confirms the process is alive and the HTTP server is responding. Use for Kubernetes liveness probes and load balancer health checks.

bash
curl https://mayaapi.teamcast.ai/api/v1/health/live
Response 200
{
  "status": "ok",
  "timestamp": "2024-01-15T10:00:00.000Z"
}

GET /health/ready — Readiness Probe

Checks all critical dependencies before accepting traffic. Returns 503 if any required dependency is unavailable.

bash
curl https://mayaapi.teamcast.ai/api/v1/health/ready
Response 200 — all healthy
{
  "status": "ok",
  "checks": {
    "database": { "status": "up", "latency": 2 },
    "redis": { "status": "up", "latency": 1 },
    "kafka": { "status": "up", "latency": 5 }
  }
}
Response 503 — dependency down
{
  "status": "error",
  "checks": {
    "database": { "status": "up", "latency": 2 },
    "redis": { "status": "down", "error": "ECONNREFUSED" },
    "kafka": { "status": "up", "latency": 5 }
  }
}

Kubernetes Configuration

yaml
livenessProbe:
  httpGet:
    path: /api/v1/health/live
    port: 3009
  initialDelaySeconds: 30
  periodSeconds: 10
  failureThreshold: 3

readinessProbe:
  httpGet:
    path: /api/v1/health/ready
    port: 3009
  initialDelaySeconds: 10
  periodSeconds: 5
  failureThreshold: 3

Agent Discovery

The agent card is always public and requires no authentication. It describes the system's capabilities and supported integration methods.

bash
curl https://mayaapi.teamcast.ai/.well-known/agent.json
Response 200
{
  "name": "AI Interview Agent",
  "version": "1.0.0",
  "description": "Multi-tenant AI interview platform with HITL workflow",
  "url": "https://mayaapi.teamcast.ai",
  "capabilities": {
    "a2a": true,
    "jsonRpc": true,
    "webhooks": true,
    "streaming": false
  },
  "methods": [
    "interview.create",
    "interview.status",
    "interview.approve",
    "interview.complete-info",
    "interview.modify",
    "interview.rankings",
    "assessment.approve"
  ]
}
Configure Prometheus to scrape the /api/v1/health/metrics endpoint (Prometheus format) for latency histograms, request counters, and dependency health metrics.
Was this page helpful?