API overview and conventions
Base URL, request format, authentication, errors and the conventions every BINA radar route shares.
#Base URL
http://127.0.0.1:8787/v1The API listens on loopback only. Through the console's dev server the same routes are under /api/v1/… (Vite strips the /api prefix). In the hosted review workspace, only /v1/radar/* routes are served.
#Route groups
| Group | Prefix | Page |
|---|---|---|
| Bulletin, levels, inventory | /v1/radar/bulletin, /levels, /documents, /ops | Bulletin and levels |
| Documents and recitals | /v1/radar/documents/:id/… | Documents and recitals |
| Extraction | /v1/radar/documents/:id/extract, /v1/radar/extractions/… | Extraction |
| Case reports | /v1/radar/cases/:caseNumber/… | Case reports |
| Parties and signals | /v1/radar/parties/… | Parties and signals |
| Watchlist and alerts | /v1/radar/watchlist, /alerts | Watchlist and alerts |
| Ingest and status | /v1/admin/ingest, /v1/radar/status, /ingest-runs | Ingest and status |
#Requests
POSTandDELETEbodies are JSON and needContent-Type: application/json(otherwise415).- JSON bodies are capped at 100 KB (
413above that). The watchlist import route accepts up to 1 MB. - Path segments such as case numbers are URL-encoded:
DMA.100075is sent as is,AT.40437too. - Dates are ISO
YYYY-MM-DD.
#Responses
All responses are JSON, except the HTML case snapshot. Every response carries:
| Header | Value |
|---|---|
Cache-Control | no-store |
X-Content-Type-Options | nosniff |
X-Cleary-Mode | fixture, mixed or live |
Radar responses also carry sample: true or a mode field when they come from the sample inventory.
#Errors
Errors are a JSON object with a human-readable error sentence and, where useful, a stable machine code:
{ "error": "The quote does not appear word for word in that recital.", "code": "quote_not_in_recital" }Match on code, never on the sentence. See Errors and status codes for the full list.
#Authentication
Reads need nothing locally. Writes need an operator token once CLEARY_OPERATOR_TOKENS is set:
Authorization: Bearer <token>See Authenticate writes.
#Attribution fields
Writes that record a human act name the person: by, reviewedBy, requestedBy, importedBy, proposedBy or estimatedBy, 1–120 characters. With operator tokens on, BINA fills them from the token and refuses a mismatch with 403.
#Pagination
List routes accept limit and offset and return total, offset and limit. The default limit is 200, the maximum 1,000.
#Browser access
A disallowed Origin is 403; a Host outside the allowlist is 421. Allowed origins default to the console's Vite origins. Extend with CLEARY_ALLOWED_ORIGINS and CLEARY_ALLOWED_HOSTS only behind a reverse proxy.