API: cycles
GET /api/v1/cycles/history
Section titled “GET /api/v1/cycles/history”Cycle History
N-day cycle history. Derived from pipeline_run and lifecycle_log.
Auth: Authorization: Bearer <token> required
| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
days | query | no | integer |
Responses:
| Code | Meaning | Body |
|---|---|---|
200 | Successful Response | array of CycleDay |
401 | Missing or invalid authentication credentials | ErrorResponse |
422 | Validation Error | HTTPValidationError |
GET /api/v1/cycles/status
Section titled “GET /api/v1/cycles/status”Cron Status
Cron + last/next run summary. Settings-derived; future Cron service
SPEC will replace with real cron state from a cron_runs table.
Auth: Authorization: Bearer <token> required
Responses:
| Code | Meaning | Body |
|---|---|---|
200 | Successful Response | CronStatus |
401 | Missing or invalid authentication credentials | ErrorResponse |
GET /api/v1/cycles/timeline
Section titled “GET /api/v1/cycles/timeline”Cycle Timeline
Per-day timeline of auto-chain events. Derived from lifecycle_log and
pipeline_run ordered by timestamp.
Auth: Authorization: Bearer <token> required
| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
date | query | no | string | null |
Responses:
| Code | Meaning | Body |
|---|---|---|
200 | Successful Response | array of TimelineEvent |
401 | Missing or invalid authentication credentials | ErrorResponse |
422 | Validation Error | HTTPValidationError |
GET /api/v1/cycles/today
Section titled “GET /api/v1/cycles/today”Today Funnel
Funnel summary for today’s auto-cycle, plus per-SC breakdown.
Derived from:
pipeline_runrows created today (≈ runs started)generated_articlescount by status (pending / ready / live)salescontractsfor per-SC grouping
Auth: Authorization: Bearer <token> required
Responses:
| Code | Meaning | Body |
|---|---|---|
200 | Successful Response | TodayFunnel |
401 | Missing or invalid authentication credentials | ErrorResponse |