Skip to content

System Endpoints

Health, info, and system management.

Health Check

GET /health

Basic health check.

bash
curl http://localhost:3000/health

Response:

json
{
  "status": "ok",
  "timestamp": "2024-01-01T00:00:00Z"
}

System Info

GET /info

Get system information.

bash
curl http://localhost:3000/info \
  -H "Authorization: Bearer <token>"

Response:

json
{
  "version": "1.0.0",
  "uptime": 86400,
  "nodeVersion": "20.10.0",
  "database": "supabase",
  "cache": "redis",
  "features": {
    "agent": true,
    "mfa": true,
    "rbac": true
  }
}

GET /info/routes

List registered routes.

bash
curl http://localhost:3000/info/routes \
  -H "Authorization: Bearer <token>"

Response:

json
{
  "routes": [
    { "method": "GET", "path": "/users" },
    { "method": "POST", "path": "/users" },
    { "method": "GET", "path": "/users/:id" }
  ],
  "total": 105
}

WebSocket Info

GET /websocket/info

Get WebSocket configuration.

bash
curl http://localhost:3000/websocket/info

Response:

json
{
  "enabled": true,
  "path": "/ws",
  "channels": ["notifications", "updates"]
}

Deployment

GET /deployment/status

Get deployment status.

bash
curl http://localhost:3000/deployment/status

Response:

json
{
  "status": "running",
  "version": "1.0.0",
  "startedAt": "2024-01-01T00:00:00Z",
  "environment": "production"
}

GET /deployment/stream

Stream deployment events (SSE).

bash
curl http://localhost:3000/deployment/stream \
  -H "Accept: text/event-stream"

Analytics

GET /analytics/summary

Get analytics summary.

bash
curl http://localhost:3000/analytics/summary \
  -H "Authorization: Bearer <token>"

Response:

json
{
  "period": "2024-01",
  "totalRequests": 150420,
  "uniqueUsers": 1234,
  "avgResponseTime": 45,
  "errorRate": 0.02
}

GET /analytics/endpoints

Get per-endpoint analytics.

bash
curl http://localhost:3000/analytics/endpoints \
  -H "Authorization: Bearer <token>"

Response:

json
{
  "endpoints": [
    {
      "path": "/users",
      "method": "GET",
      "requests": 5000,
      "avgTime": 35,
      "errors": 10
    }
  ]
}

Released under the ISC License.