How-to guidesHow-to guide · Goal-oriented
Load live decisions
Replace the sample inventory with real Commission and Autorité de la concurrence publications for a period.
Use this guide when you want BINA to serve real publications instead of the sample. A live radar ingest removes the sample rows.
#Before you begin
- The API can reach the internet (
CLEARY_OFFLINEis not set). - At least 2 GiB free on the data volume.
- One writer per data directory. Either use the API route below while the API runs, or stop the API before using the CLI.
#1. Load the source snapshots
The radar reuses the DG COMP and ADLC snapshots. Load them once:
npm run ingest competition # DG COMP open datasets, several hundred MB the first time
npm run ingest extra # ADLC datasets (and other lookup sources), about 1 GB the first timeUnchanged upstream files are skipped by ETag on later runs.
#2. Start a radar ingest for a period
With the API running:
curl -s http://127.0.0.1:8787/v1/admin/ingest \
-H 'Content-Type: application/json' \
-d '{"target":"radar","from":"2026-01-01","to":"2026-10-28","textLimit":200}'The API answers 202 immediately:
{ "runId": "run_radar_3f9a1c2b7d10", "status": "running", "statusPath": "/v1/radar/ingest-runs/run_radar_3f9a1c2b7d10" }| Option | Default | Meaning |
|---|---|---|
from, to | none | ISO dates. from must not be after to. |
textLimit | 25 | Commission PDFs to fetch this run, 1–200. |
texts | true | Fetch decision texts. |
pressReleases | true | Fetch press releases. |
#3. Poll until it finishes
curl -s http://127.0.0.1:8787/v1/radar/ingest-runs/run_radar_3f9a1c2b7d10 | python3 -m json.toolstatus ends as one of:
activated— everything in the period was processed.partial— PDFs are still queued, some retrievals failed, or a source snapshot was missing. Thesummarysays which.failed— the run stopped;errorsays why.
#4. Continue until nothing remains
If summary.text.remaining is above zero, send the same request again. Stored text that has not changed is reused, so repeat runs only fetch what is left.
#5. Check coverage
curl -s http://127.0.0.1:8787/v1/radar/status | python3 -m json.toolmode should now be live. Check textStatuses for documents that need attention:
| Status | Meaning |
|---|---|
not_in_source | The snapshot has no full text or PDF link. It does not mean the authority never published one. |
unparsed | Full text was stored but no numbered recitals were found. |
Neither state is ever replaced with sample text.
#Troubleshooting
409 An ingest is already running.Wait for the current run, then retry.409 The server is offline— unsetCLEARY_OFFLINEand restart.- One document is missing text — fetch it on its own with
POST /v1/radar/documents/:id/text.