Admin

Operator telemetry analysis (data-moat v1)

Operator-only, READ-ONLY analysis over telemetry that already exists — it introduces no new capture path. Over an Europe/Oslo-aligned trailing window it aggregates the existing operational tables (task_success_log, audit_log, api_usage, mcp_query_log) into four signals that show what is failing and where the contract is incomplete: recurring error codes, government-rejection shapes, latency outliers, and error shapes the Compliance Explainer does not yet document. WHY this exists: surfacing these patterns is the feedback signal that tells the team which rules, explanations, and upstream handlers to harden next — the analytical core of the product's data advantage. Auth is ADMIN_API_KEY (the same guard as the key-management endpoints); there is deliberately no zero-auth variant because this reads cross-consumer operational data. Each underlying read fails soft and is reported in source_reads, so a single table being unavailable degrades that one section rather than the whole response.

get/api/v1/admin/telemetry

Request

  • Base URL: https://www.apier.no
  • URL: https://www.apier.no/api/v1/admin/telemetry
  • Auth: HTTP bearer

Query parameters

window_daysinteger

Trailing analysis window length in Europe/Oslo calendar days. WHY capped at 30: the shortest-retention source the report reads, api_usage, is auto-deleted at 30 days (log retention). A longer window would let this shared window block claim a lookback that latency_by_endpoint cannot cover while the eternal audit_log sections genuinely span it, so an operator could misread latency coverage. Capping at 30 keeps the single window truthful for every section. Defaults to 7 (the last operational week).

Response

The telemetry analysis report. Always a 200 envelope when authenticated — a fully-empty report (no rows, or every read failed soft) is empty arrays, never an error, so an operator dashboard can render unconditionally.

successtrue

Always true on success.

Example response

{
  "_meta": {
    "rulebook_version": "v1.0.0",
    "source": "apier.no",
    "data_source": "Brønnøysund Enhetsregisteret + Apier Universal Rulebook",
    "schema_version": "1.0.0",
    "legal_basis": "NLOD — public registry reuse",
    "response_timestamp": "2026-04-24T12:00:00.000Z",
    "response_hash": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
    "source_snapshot_id": "brreg-2026-04-24T02:00:00.000Z",
    "cost_nok": 0.5,
    "wallet_remaining_nok": 9.5,
    "spend_cap_remaining_nok": 12.5
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.