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.
Auth: Authorization: Bearer <token> required
Request
Section titled “Request”curl -sS -X POST "https://entherium.duckdns.org:8443/api/v1/analytics/collect" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"collect":"<collect>","date":"<date>","with_psi":"<with_psi>"}'Response 200
Section titled “Response 200”The contract carries no example for this response; schema: object. Field-level shape: interactive explorer.
Returns
Section titled “Returns”object — Successful Response
Parameters
Section titled “Parameters”| Parameter | In | Required | Type | Default | Constraints | Description |
|---|---|---|---|---|---|---|
Idempotency-Key | header | no | string | — | uuid | Optional. |
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
collect | boolean | no | |
date | string | null | no | |
with_psi | boolean | no |
Errors
Section titled “Errors”| Code | Meaning | Body |
|---|---|---|
401 | Missing or invalid authentication credentials | ErrorResponse |
422 | Validation Error | HTTPValidationError |
Every error body is {detail, code?, request_id, doc_url} — request_id is the value to quote, doc_url points at the Errors reference.