API: analytics
POST /api/v1/analytics/collect
Заголовок раздела «POST /api/v1/analytics/collect»Collect
Trigger a collection run (idempotent; safe to re-run).
collect=false runs the cheap SYNCHRONOUS mode: external collectors are not called,
only the ingest of already-fetched files and topic scoring run, and the caller gets the
RESULT instead of an “accepted” — so a scheduled caller can tell whether the loop
actually computed.
Авторизация: нужен Authorization: Bearer <token>
| Параметр | Где | Обязателен | Тип | Описание |
|---|---|---|---|---|
Idempotency-Key | header | нет | string | Optional. |
Тело запроса: application/json — схема CollectTrigger
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
collect | boolean | нет | |
date | string | null | нет | |
with_psi | boolean | нет |
Ответы:
| Код | Смысл | Тело |
|---|---|---|
200 | Successful Response | object |
401 | Missing or invalid authentication credentials | ErrorResponse |
422 | Validation Error | HTTPValidationError |
GET /api/v1/analytics/instances/{instance_id}
Заголовок раздела «GET /api/v1/analytics/instances/{instance_id}»Instance Dashboard
Everything one per-instance analytics panel needs (snapshot + trends + queries + pages + index).
Авторизация: нужен Authorization: Bearer <token>
| Параметр | Где | Обязателен | Тип | Описание |
|---|---|---|---|---|
instance_id | path | да | string |
Ответы:
| Код | Смысл | Тело |
|---|---|---|
200 | Successful Response | InstanceDashboard |
401 | Missing or invalid authentication credentials | ErrorResponse |
422 | Validation Error | HTTPValidationError |
GET /api/v1/analytics/overview
Заголовок раздела «GET /api/v1/analytics/overview»Overview
Cross-instance grid: latest snapshot KPIs + health per instance.
Авторизация: нужен Authorization: Bearer <token>
Ответы:
| Код | Смысл | Тело |
|---|---|---|
200 | Successful Response | OverviewResponse |
401 | Missing or invalid authentication credentials | ErrorResponse |
GET /api/v1/analytics/runs
Заголовок раздела «GET /api/v1/analytics/runs»Runs
Recent collection-run manifests.
Авторизация: нужен Authorization: Bearer <token>
Ответы:
| Код | Смысл | Тело |
|---|---|---|
200 | Successful Response | массив CollectionRunRead |
401 | Missing or invalid authentication credentials | ErrorResponse |