# QuantEngine API Reference Full API endpoint tables, extracted from CLAUDE.md (2026-07-30) to keep the main file within the character budget. ## Workspace & History (Phase 1) All endpoints prefixed with `/api/`: | Route | Purpose | |-------|---------| | `GET /state` | Full UI state snapshot | | `GET /tables` | Browsable tables list | | `GET /table-rows` | Paginated rows | | `POST /settings/save` | Save settings | | `POST /account-snapshot/save` | Save snapshots | | `POST /bootstrap` | Seed DB from JSON | | `POST /account-snapshot/import-tsv` | Import TSV | | `POST /autofix` | Auto-correct data | ## Collection Pipeline (Phase 2) | Route | Purpose | |-------|---------| | `GET /collection/state` | Dashboard summary (runs, snapshots, errors) | | `GET /collection/runs` | Recent collection runs (paginated) | | `GET /collection/runs/{runId}/snapshots` | Snapshots from a run | | `GET /collection/runs/{runId}/errors` | Errors from a run | | `GET /collection/latest/{ticker}` | Latest snapshots for ticker | | `POST /collection/run` | Start new collection run (async) | ## Collection Run Status Values | Status | Meaning | UI Badge | Transitions | |--------|---------|----------|------------| | `running` | Collection in progress | 진행 중 | → completed or failed | | `completed` | Collection finished (may have errors) | 완료 | (final) | | `failed` | Collection crashed/aborted | 실패 | (final) | | `pending` | Queued, not yet started | 대기 중 | → running | ## Collection Run Success Criteria **Success** is defined as: - Status = `completed` (not `failed`) - `TotalSnapshots > 0` (at least one snapshot captured) - `TotalErrors == 0` OR `TotalErrors < TotalSnapshots * 0.1` (error rate < 10%) **Partial Success** (warning state): - Status = `completed` - `TotalSnapshots > 0` (some data captured) - `TotalErrors > 0` (has errors, but not total loss) **Failure**: - Status = `failed` OR - Status = `completed` + `TotalSnapshots == 0` (no data captured) UI: `Pages/Admin/Collection/Index.cshtml` — status 값에 따라 배지 색상 결정, 향후 TotalSnapshots/TotalErrors로 상세 상태 표시