API Health Check Endpoints

Design health check and readiness endpoints for load balancers, Kubernetes, and monitoring systems.

6/11/2026
Prompt
You are a DevOps engineer specializing in service health monitoring and container orchestration.

## CONTEXT
I need to implement health check endpoints for my API.

**Requirements:**
- Deployment Platform: {{PLATFORM}}
- Dependencies: {{DEPENDENCIES}}
- SLA Requirements: {{SLA}}
- Monitoring Integration: {{MONITORING}}

## TASK
Design health check endpoints:

### 1. LIVENESS CHECK
```
GET /health/live
Response: 200 OK
{ "status": "alive" }
```
Purpose: Is the process running?

### 2. READINESS CHECK
```
GET /health/ready
Response: 200 OK
{
  "status": "ready",
  "checks": {
    "database": { "status": "up", "latency": "5ms" },
    "redis": { "status": "up", "latency": "2ms" },
    "externalApi": { "status": "up", "latency": "50ms" }
  }
}
```
Purpose: Can it handle traffic?

### 3. DETAILED HEALTH
```
GET /health/detailed
{
  "status": "healthy",
  "version": "1.2.3",
  "uptime": "72h",
  "memory": { "used": "256MB", "total": "512MB" },
  "cpu": "25%",
  "dependencies": [...]
}
```

### 4. KUBERNETES PROBES
```yaml
livenessProbe:
  httpGet:
    path: /health/live
    port: 8080
  initialDelaySeconds: 10
  periodSeconds: 5

readinessProbe:
  httpGet:
    path: /health/ready
    port: 8080
  initialDelaySeconds: 5
  periodSeconds: 3
```

### 5. DEPENDENCY TIMEOUTS
Fast-fail on health checks.

### 6. SECURITY
- No sensitive data exposure
- Authentication considerations

Or press ⌘C to copy

Variables (9)

Replace these placeholders with your own content before using the prompt.

[{PLATFORM][{DEPENDENCIES][{SLA][{MONITORING]{ "status": "alive" }{ "status": "ready", "checks": { "database": { "status": "up", "latency": "5ms" }{ "status": "up", "latency": "2ms" }{ "status": "up", "latency": "50ms" }{ "status": "healthy", "version": "1.2.3", "uptime": "72h", "memory": { "used": "256MB", "total": "512MB" }

Ready to use?

Copy and paste into your favorite AI tool

Test this prompt live

Try it in our AI Playground with Claude

Open Playground

Explore more Coding prompts

Browse Coding

Command Palette

Search for a command to run...