Discovery

Agent-readiness probe — live task success rates + circuit-breaker state

Zero-auth, per-IP rate-limited (Category A — 1000/min soft cap), and NEVER cached (Cache-Control: no-store). Call this BEFORE submitting a batch of compliance workflows to decide whether to proceed, throttle, or hand over to a human.

Returns two health signals. (1) circuit_breaker — the live Maskinporten circuit-breaker verdict: CLOSED = healthy, OPEN / HALF_OPEN = the upstream is failing or probing recovery, UNKNOWN = the breaker read itself failed. status is the boolean projection — ready only when the breaker is CLOSED, otherwise degraded. (2) endpoints — per-workflow-class live task success rate + p95 latency drawn from the task_success_log telemetry view.

Each endpoints.* entry carries a source flag: live when the value came from accumulated telemetry, fallback when no rows have been logged yet for that workflow class and a conservative static default (derived from load-test + staging) was substituted. Treat fallback rates as indicative, not measured. A null entry means the underlying read rejected unexpectedly — degrade gracefully rather than blocking.

This surface is distinct from the un-versioned infrastructure liveness check at /api/health: that one answers 'is the process up?', this one answers 'should an agent trust Apier with a workflow right now?'. The response always uses HTTP 200 — a degraded verdict is reported in the body, never via status code, so the probe always answers.

The envelope _meta.source is the honesty signal for the rates above: it reads apier.no telemetry when at least one endpoint's rate came from measured live telemetry, and the neutral apier.no when every endpoint is still serving its static fallback (the low-traffic default today, and the case when both reads reject) — so the envelope never advertises a measurement it doesn't have.

get/api/v1/health/agent-readiness

Request

  • Base URL: https://www.apier.no
  • URL: https://www.apier.no/api/v1/health/agent-readiness
  • Auth: none required

Response

Readiness payload. Always 200 — a degraded verdict is carried in data.status, not the HTTP status.

successtrue required

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.