Insolitum Developers
API Reference

Health Endpoint

Required health check endpoint specification. Every module must expose GET /api/health.

Health Endpoint

Every Insolitum Universe module must expose a health check endpoint at GET /api/health.

Contract

Request

GET /api/health
Accept: application/json

Response

{
  "status": "ok",
  "module": "my-module",
  "version": "1.0.0",
  "timestamp": "2026-02-13T12:00:00.000Z",
  "uptime_since": "2026-02-13T11:55:00.000Z",
  "checks": {
    "supabase": true
  }
}

Fields

FieldTypeRequiredDescription
status"ok"YesMust be exactly "ok"
modulestringYesModule ID / slug
versionstringYesSemVer version
timestampstringYesCurrent ISO timestamp
uptime_sincestringNoWhen the server started
checksobjectNoService connectivity checks
checks.supabasebooleanNoWhether Supabase URL is configured

HTTP Status

Must return 200 OK.

Any status code other than 200, or a response where status !== "ok", will cause the validation to fail.

Performance

MetricTarget
Response time< 500ms (ideal)
Timeout5000ms (validation aborts)

Implementation

The module-starter template includes a ready-to-use implementation:

src/app/api/health/route.ts
import { NextResponse } from 'next/server';
 
const MODULE_ID = process.env.NEXT_PUBLIC_MODULE_ID || 'my-module';
const MODULE_VERSION = process.env.NEXT_PUBLIC_MODULE_VERSION || '1.0.0';
const startedAt = new Date().toISOString();
 
export async function GET() {
  return NextResponse.json({
    status: 'ok',
    module: MODULE_ID,
    version: MODULE_VERSION,
    uptime_since: startedAt,
    timestamp: new Date().toISOString(),
    checks: {
      supabase: !!process.env.NEXT_PUBLIC_SUPABASE_URL,
    },
  });
}

When Is It Checked?

The health endpoint is validated during:

  1. Marketplace submission β€” automated validation
  2. Periodic monitoring β€” Shell checks module health
  3. Module activation β€” when an organization enables the module
  4. Manual review β€” by the Insolitum review team

Testing

Use the Module Validator or curl:

curl -s http://localhost:3010/api/health | jq .

On this page