Skip to content

Health API

Simple health check endpoints for monitoring and load balancers.

Base Path: /api/health

Authentication: No authentication required.

Endpoints

MethodPathAuthDescription
GET/NoBasic health check
GET/readyNoReadiness probe

Health Check

Basic liveness probe that confirms the API is running.

GET /api/health

Response:

json
{
	"status": "ok",
	"timestamp": "2025-01-07T10:00:00.000Z"
}

Readiness Probe

Extended health check that can include dependency status.

GET /api/health/ready

Response:

json
{
	"status": "ok",
	"timestamp": "2025-01-07T10:00:00.000Z"
}

Usage

Cloudflare Pages Health Check

Configure in wrangler.toml or Cloudflare dashboard:

toml
[site]
health_check = "/api/health"

Uptime Monitoring

Use with external monitoring services:

bash
# Simple health check
curl https://app.podcasterplus.com/api/health

# Expected: {"status":"ok","timestamp":"..."}

TypeScript Client Usage

typescript
import { createApiClient } from '$api/client';

const client = createApiClient(fetch);

// Health check
const healthRes = await client.api.health.$get();
const { status } = await healthRes.json();

if (status !== 'ok') {
	console.error('API health check failed');
}

Internal documentation - Not for public distribution