Skip to main content

System

System endpoints provide health checks, version information, and public configuration. These endpoints do not require authentication.

Endpoints

MethodPathAuth RequiredDescription
GET/NoAPI index -- returns version string
GET/healthNoHealth check with service status
GET/configNoPublic frontend configuration

API Index

Returns a simple version string.

curl https://your-domain.com/api/v1/

Response 200 OK

Forja API v0.1.0

Health Check

Returns a structured health report for all backend services: database, Redis cache, Clerk IDP, and storage backend. Includes latency measurements for each service.

curl https://your-domain.com/api/v1/health

Response 200 OK

{
"status": "healthy",
"services": [
{
"name": "database",
"status": "up",
"latency_ms": 2,
"error": null
},
{
"name": "redis (cache)",
"status": "up",
"latency_ms": 1,
"error": null
},
{
"name": "clerk (idp)",
"status": "up",
"latency_ms": 45,
"error": null
}
],
"storage": {
"name": "storage (local)",
"status": "up",
"latency_ms": 0,
"provider": "local",
"total_bytes": 107374182400,
"available_bytes": 53687091200,
"used_percent": 50.0
}
}

Status Values

StatusHTTP CodeMeaning
healthy200All services are up
degraded200Database is up but optional services (Redis, Clerk, storage) are down
unhealthy503Database is down

Service Status Values

  • up -- Service is operational
  • down -- Service is unreachable
  • disabled -- Service is not configured

Public Configuration

Returns runtime configuration for the admin dashboard frontend. This is the only way the frontend discovers the Clerk publishable key without bundling it.

curl https://your-domain.com/api/v1/config

Response 200 OK

{
"clerk_publishable_key": "pk_live_abc123...",
"app_name": "Forja"
}