REST Endpoints
The application exposes REST endpoints for monitoring, manual pipeline control, and health checks.
Health
| Method | Path | Description |
|---|---|---|
GET | /health | Basic health: {status, uptime, timestamp} |
GET | /health/browser | Browser readiness: {status, ready, timestamp} |
GET | /health/tts | TTS model readiness: {status, ready, timestamp} |
Pipeline Control
| Method | Path | Description |
|---|---|---|
GET | /pipeline/trigger | Trigger a manual pipeline run |
GET | /pipeline/status | Current pipeline status |
GET | /pipeline/runs | Recent pipeline runs (default: 20) |
GET | /pipeline/runs/:id | Specific 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 running429— Daily post limit reached
Dashboard API
| Method | Path | Description |
|---|---|---|
GET | /api/dashboard/stats | Aggregate pipeline statistics |
GET | /api/dashboard/runs?limit=50 | Recent pipeline runs |
GET | /api/dashboard/posts?limit=50 | Recent processed posts |
GET | /api/dashboard/health | Component health summary |
GET | /api/dashboard/logs?limit=50&level=info | Buffered 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.