{
  "openapi": "3.1.0",
  "info": {
    "title": "Northbridge Observatory Public API",
    "version": "2026-10",
    "description": "Public interface for sanitized demonstration observations and the bounded security-report intake. Observation resources are read-only. Live internal service context and submitted reports require an authenticated operator session."
  },
  "paths": {
    "/api/security/reports": {
      "post": {
        "summary": "Submit a security report",
        "description": "Stores a bounded report in the server-side operator queue. The optional reply address is not published. Same-origin checks, a honeypot and a keyed per-network rate limit protect the intake.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/SecurityReportInput" }
            }
          }
        },
        "responses": {
          "201": { "description": "Report stored; returns an opaque reportId and receivedAt timestamp" },
          "400": { "description": "Invalid or out-of-bounds report" },
          "403": { "description": "Request origin rejected" },
          "413": { "description": "Request body exceeds 16 KiB" },
          "415": { "description": "Content type is not application/json" },
          "429": { "description": "Three-report hourly network limit reached" },
          "503": { "description": "Security intake is not enabled" }
        }
      }
    },
    "/api/v1/status": { "get": { "summary": "Read demonstration status", "description": "Unauthenticated responses describe a sanitized public-preview dataset and include dataset.class=demonstration and dataset.live=false.", "responses": { "200": { "description": "Current public-preview status" } } } },
    "/api/v1/capabilities": { "get": { "summary": "List observable capabilities", "description": "The retained dual-stack-path identifier is an API-compatible demonstration-route dimension and is not a claim that northbridge.gripe has IPv6 reachability. capability_scopes records that distinction.", "responses": { "200": { "description": "Capability catalog with target scopes" } } } },
    "/api/v1/regions": { "get": { "summary": "List logical regions", "responses": { "200": { "description": "Logical region catalog" } } } },
    "/api/v1/time": { "get": { "summary": "Read runtime UTC clock", "responses": { "200": { "description": "Clock sample" } } } },
    "/api/v1/telemetry": { "get": { "summary": "Read the sanitized demonstration telemetry snapshot", "description": "This unauthenticated endpoint serves the public-preview dataset, not live internal service context. The response includes dataset.class=demonstration and dataset.live=false. Each probe includes its server-issued observation ID, metric name, unit, sample time, collection state, target scope and a 24-hour comparison. The dual-stack-path key has scope=demonstration-route and does not assert IPv6 reachability for northbridge.gripe. A comparison remains insufficient-history until at least 12 distinct samples and a baseline within 30 minutes of the target are retained. The DNS authority probe also returns target-specific DNSSEC evidence with secure, insecure, bogus, indeterminate or unavailable semantics; resolver consensus does not imply DNSSEC security.", "responses": { "200": { "description": "Current demonstration telemetry snapshot" }, "503": { "description": "Observation store unavailable" } } } },
    "/api/v1/observations/{id}": { "get": { "summary": "Resolve a retained public-preview correlation identifier", "parameters": [{ "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^(obs|prb)_[0-9a-f]{32}$" } }], "responses": { "200": { "description": "Retained demonstration observation identity and manifest" }, "404": { "description": "Unknown observation identifier" }, "410": { "description": "Known observation whose correlation window expired" }, "503": { "description": "Observation lookup unavailable" } } } },
    "/api/v1/telemetry/history": { "get": { "summary": "Read bucketed demonstration history", "description": "The unauthenticated series belongs to the sanitized public-preview dataset. Intervals use stable UTC epoch boundaries. Each point reports whether its interval is complete; the current interval may continue to accumulate samples.", "parameters": [{ "name": "range", "in": "query", "description": "Retained demonstration window. Response resolution is reported in bucketSeconds.", "schema": { "type": "string", "enum": ["15m", "30m", "1h", "2h", "4h", "8h", "12h", "24h"], "default": "15m" } }], "responses": { "200": { "description": "Historical demonstration series" }, "400": { "description": "Unsupported range" }, "503": { "description": "Observation history unavailable" } } } },
    "/api/v1/incidents": { "get": { "summary": "Read demonstration advisory and recovery transitions", "description": "The unauthenticated incident journal belongs to the sanitized public-preview dataset and includes dataset.live=false.", "responses": { "200": { "description": "Demonstration transition history" } } } }
  },
  "components": {
    "schemas": {
      "SecurityReportInput": {
        "type": "object",
        "additionalProperties": false,
        "required": ["category", "summary", "details"],
        "properties": {
          "category": { "type": "string", "enum": ["access", "injection", "exposure", "other"] },
          "affectedRoute": { "type": "string", "maxLength": 200 },
          "summary": { "type": "string", "minLength": 12, "maxLength": 160 },
          "details": { "type": "string", "minLength": 40, "maxLength": 4000 },
          "replyContact": { "type": "string", "format": "email", "maxLength": 254, "description": "Optional, private address for acknowledgement or follow-up." }
        }
      }
    }
  }
}
