/api/collect 트리거 엔드포인트 + 로그 조회 #4

Closed
opened 2026-04-22 00:26:27 +09:00 by xhh · 0 comments
Owner

POST /api/collect/daily, POST /api/collect/insider?ticker=X, GET /api/collect/logs?days=7, GET /api/collect/status.


추가 명세 (#22 운영 대시보드 연동)

GET /api/collect/history

수집 이력 타임라인 시각화를 위한 구조화된 응답.

  • 쿼리: ?days=30 (기본 30일), ?collection_type=fred|equity|crypto|insider|margin (선택)
  • 응답: collection_logs 를 일자별 × 수집기별로 집계
    {
      "period": {"from": "2026-03-23", "to": "2026-04-22"},
      "entries": [
        {"date": "2026-04-17", "collection_type": "fred", "success": 19, "failed": 0},
        {"date": "2026-04-17", "collection_type": "equity", "success": 50, "failed": 0}
      ]
    }
    
  • read 스코프

POST /api/collect/* 응답 확장

  • 수동 트리거 시 간단한 실행 요약을 동기적으로 반환 (긴 수집은 background_task 로 위임 후 job_id 반환 방식 고려)
  • write 스코프
POST /api/collect/daily, POST /api/collect/insider?ticker=X, GET /api/collect/logs?days=7, GET /api/collect/status. --- ## 추가 명세 (#22 운영 대시보드 연동) ### GET /api/collect/history 수집 이력 타임라인 시각화를 위한 구조화된 응답. - 쿼리: `?days=30` (기본 30일), `?collection_type=fred|equity|crypto|insider|margin` (선택) - 응답: `collection_logs` 를 일자별 × 수집기별로 집계 ```json { "period": {"from": "2026-03-23", "to": "2026-04-22"}, "entries": [ {"date": "2026-04-17", "collection_type": "fred", "success": 19, "failed": 0}, {"date": "2026-04-17", "collection_type": "equity", "success": 50, "failed": 0} ] } ``` - read 스코프 ### POST /api/collect/* 응답 확장 - 수동 트리거 시 간단한 실행 요약을 동기적으로 반환 (긴 수집은 background_task 로 위임 후 job_id 반환 방식 고려) - write 스코프
xhh closed this issue 2026-04-22 03:02:08 +09:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
xhh/financial-data-platform#4
No description provided.