Skip to content

REST Endpoints

The application exposes REST endpoints for monitoring, manual pipeline control, and health checks.

Health

MethodPathDescription
GET/healthBasic health: {status, uptime, timestamp}
GET/health/browserBrowser readiness: {status, ready, timestamp}
GET/health/ttsTTS model readiness: {status, ready, timestamp}

Pipeline Control

MethodPathDescription
GET/pipeline/triggerTrigger a manual pipeline run
GET/pipeline/statusCurrent pipeline status
GET/pipeline/runsRecent pipeline runs (default: 20)
GET/pipeline/runs/:idSpecific run details

GET /pipeline/trigger

Manually triggers a pipeline run. Returns immediately with the run ID.

Response:

json
{
  "id": "abc123",
  "status": "running",
  "stage": "fetching",
  "startedAt": "2025-01-15T10:30:00.000Z"
}

Error responses:

  • 409 — Pipeline already running
  • 429 — Daily post limit reached

Dashboard API

MethodPathDescription
GET/api/dashboard/statsAggregate pipeline statistics
GET/api/dashboard/runs?limit=50Recent pipeline runs
GET/api/dashboard/posts?limit=50Recent processed posts
GET/api/dashboard/healthComponent health summary
GET/api/dashboard/logs?limit=50&level=infoBuffered application logs

GET /api/dashboard/stats

json
{
  "totalRuns": 142,
  "successCount": 128,
  "failureCount": 14,
  "successRate": 0.901,
  "avgDurationMs": 45200,
  "todayCompleted": 4,
  "todayFailed": 0
}

GET /api/dashboard/health

json
{
  "browser": { "ready": true },
  "tts": { "ready": true },
  "nextScheduledRun": "2025-01-15T14:00:00.000Z"
}

Dashboard UI

GET /dashboard serves a static monitoring UI with real-time stats, run history, and system health indicators.

Built with VitePress