{
  "openapi": "3.1.0",
  "info": {
    "title": "FastAPI",
    "version": "0.1.0"
  },
  "paths": {
    "/activity/": {
      "get": {
        "tags": [
          "activity",
          "mongo"
        ],
        "summary": "Get Activity",
        "description": "Merged newest-first 'what changed' stream across the infrastructure\nchange logs. Defaults to the last 7 days, all domains.",
        "operationId": "get_activity_activity__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Unix-seconds lower bound on event time.",
              "title": "Since"
            },
            "description": "Unix-seconds lower bound on event time."
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Unix-seconds upper bound on event time.",
              "title": "Until"
            },
            "description": "Unix-seconds upper bound on event time."
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "maximum": 90,
                  "minimum": 1
                },
                {
                  "type": "null"
                }
              ],
              "description": "Convenience window: when ``since`` is omitted, look back this many days (default 7). Ignored if ``since`` is given.",
              "default": 7,
              "title": "Days"
            },
            "description": "Convenience window: when ``since`` is omitted, look back this many days (default 7). Ignored if ``since`` is given."
          },
          {
            "name": "domains",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated domain filter (any of: probe, anchor, anycast, dnsmon, geonames, unlocode). Omit for all.",
              "title": "Domains"
            },
            "description": "Comma-separated domain filter (any of: probe, anchor, anycast, dnsmon, geonames, unlocode). Omit for all."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Activity Activity  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/addresses/asns/{asn}/": {
      "get": {
        "tags": [
          "addresses",
          "IP",
          "ASN",
          "addresses",
          "mongo"
        ],
        "summary": "Get ASN info",
        "description": "ASN enrichment record sourced from RIPE STAT (cached in\n``db.asns``) plus live probe counts aggregated from ``db.probes``.\n\nPass ``?update=true`` to force a re-fetch from RIPE STAT — probe\ncounts always recompute regardless.\n\nAlso merges a small ``peeringdb`` summary onto the response when\nthe AS is present in the local PeeringDB cache — IXP-count,\nfacility-count, and a name + type so the lookup view can link to\nthe full PeeringDB profile without re-fetching.",
        "operationId": "get_addresses_asns_addresses_asns__asn___get",
        "parameters": [
          {
            "name": "asn",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Asn"
            }
          },
          {
            "name": "update",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Update"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/addresses/asns/{asn}/dossier": {
      "get": {
        "tags": [
          "addresses",
          "IP",
          "ASN",
          "addresses",
          "mongo"
        ],
        "summary": "Full AS dossier",
        "description": "One-call 'who is this network' composition: ASN overview +\nPeeringDB presence (IXPs / facilities) + APNIC user population (latest\n+ series) + anycast-prefix counts + RIPE Atlas footprint. Warms the\n``db.asns`` cache first (refresh-if-missing) so a cold AS still\nreturns a populated dossier.",
        "operationId": "get_asn_dossier_addresses_asns__asn__dossier_get",
        "parameters": [
          {
            "name": "asn",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Asn"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/addresses/ips/{ip}/": {
      "get": {
        "tags": [
          "addresses",
          "IP",
          "ASN",
          "addresses",
          "mongo"
        ],
        "summary": "Get IP address or prefix info",
        "description": "IP / CIDR-prefix enrichment record fanned out across RIPE STAT,\nIPmap, and IPlocate (cached in ``db.ips``) plus a live list of any\nRIPE Atlas probes registered at this address. Accepts both bare\naddresses and prefixes (RIPE STAT's ``resource`` takes either).\n\nPass ``?refresh=true`` to force a re-fetch from every upstream —\nthe probe list always recomputes regardless.\n\nAlso merges a small ``peeringdb`` summary onto the response when\nthe IP is either a PeeringDB-known peer address (exact-IP match\nagainst ``netixlan``) or sits inside a PeeringDB-known IXP LAN\nprefix. Skipped for CIDR resources (only single addresses can\nmatch a peer or LAN entry meaningfully).",
        "operationId": "get_addresses_ips_addresses_ips__ip___get",
        "parameters": [
          {
            "name": "ip",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Ip"
            }
          },
          {
            "name": "refresh",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Refresh"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors/v2/": {
      "get": {
        "tags": [
          "anchors",
          "anchors",
          "mongo"
        ],
        "summary": "List Anchors Mongo",
        "description": "Mongo-backed anchor list, served from ``db.anchors``. Same\nwire shape as the legacy ``GET /anchors/`` so callers can swap\none path for the other.\n\nServer-side filters are scoped to what the existing UI sends —\n``hostname`` (substring), ``country`` (cca2 exact-match),\n``region`` (a slug from ``db.regions`` that expands into a\n``country IN [...]`` filter), and ``dnsmon`` (the \"DNSMON only\"\ntoggle — restricts to anchors currently in ``db.anchors_dnsmon``;\nthis one *can't* be done client-side since DNSMON membership\nisn't on the anchor doc). The rest of the filter set is offered\nfor third-party callers that want to narrow without round-\ntripping the full set; the frontend's ``AnchorListView`` does the\nremaining filtering client-side after one fetch.",
        "operationId": "list_anchors_mongo_anchors_v2__get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 2500,
              "title": "Limit"
            }
          },
          {
            "name": "hostname",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Hostname"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Region"
            }
          },
          {
            "name": "decommissioned",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Decommissioned"
            }
          },
          {
            "name": "status_",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status "
            }
          },
          {
            "name": "asn",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Asn"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tag"
            }
          },
          {
            "name": "firmware",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Firmware"
            }
          },
          {
            "name": "dnsmon",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Dnsmon"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors/v2/tags/": {
      "get": {
        "tags": [
          "anchors",
          "anchors",
          "mongo"
        ],
        "summary": "List Anchor Tags",
        "description": "Distinct ``{slug, name}`` pairs across the tags carried by\nevery anchor's underlying probe. Powers the tag dropdown in the\nanchor-list view; declared *before* ``/v2/{anchor_id}/`` so the\nliteral ``tags`` segment doesn't get matched as an int id.",
        "operationId": "list_anchor_tags_anchors_v2_tags__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "type": "array",
                  "title": "Response List Anchor Tags Anchors V2 Tags  Get"
                }
              }
            }
          }
        }
      }
    },
    "/anchors/v2/by-probe/{probe_id}/": {
      "get": {
        "tags": [
          "anchors",
          "anchors",
          "mongo"
        ],
        "summary": "Get Anchor By Probe",
        "description": "Reverse-lookup: the anchor whose underlying probe matches\n``probe_id``. Powers the probe-lookup view's \"Anchor\" chip click-\nthrough, where the probe id is what's in scope but the anchor\ndetail page is keyed by anchor id.\n\nDeclared **before** ``/v2/{anchor_id}/`` so the literal\n``by-probe`` segment doesn't get matched as an int id. Returns\n404 when no anchor exists for the probe (typical case for\nnon-anchored probes).",
        "operationId": "get_anchor_by_probe_anchors_v2_by_probe__probe_id___get",
        "parameters": [
          {
            "name": "probe_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Probe Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors/v2/{anchor_id}/": {
      "get": {
        "tags": [
          "anchors",
          "anchors",
          "mongo"
        ],
        "summary": "Get Anchor Mongo",
        "description": "Single-anchor fetch by id, served from ``db.anchors``.",
        "operationId": "get_anchor_mongo_anchors_v2__anchor_id___get",
        "parameters": [
          {
            "name": "anchor_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Anchor Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors/{anchor_id}/changes/": {
      "get": {
        "tags": [
          "anchors",
          "anchors",
          "mongo"
        ],
        "summary": "Get Anchor Changes",
        "description": "Most-recent-first change events for an anchor from\n``db.anchors_history``.\n\nLogged-in only — matches ``GET /probes/{id}/changes/``. Each row\nis one refresh-tick where at least one tracked field of the\nanchor envelope changed; the embedded ``probe`` sub-key is\ndeliberately excluded from the diff (probe changes live in\n``db.probes_history``).",
        "operationId": "get_anchor_changes_anchors__anchor_id__changes__get",
        "parameters": [
          {
            "name": "anchor_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Anchor Id"
            }
          },
          {
            "name": "since_ts",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since Ts"
            }
          },
          {
            "name": "until_ts",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until Ts"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response Get Anchor Changes Anchors  Anchor Id  Changes  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/audit-events/actions/": {
      "get": {
        "tags": [
          "audit",
          "mongo"
        ],
        "summary": "List Audit Actions",
        "description": "The catalogue of auditable actions → category. Drives the\npanel's action / category filter dropdowns.",
        "operationId": "list_audit_actions_audit_events_actions__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Audit Actions Audit Events Actions  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/audit-events/": {
      "get": {
        "tags": [
          "audit",
          "mongo"
        ],
        "summary": "List Audit Events",
        "description": "List audit events, most-recent first. All filters AND-compose:\n\n- ``username`` — exact actor match.\n- ``action`` — exact catalogued action (e.g.\n  ``anchoring.fix_duplicate_measurements``).\n- ``category`` — action group (e.g. ``users``).\n- ``outcome`` — ``success`` or ``failed``.\n- ``anchor_id`` — events whose attached issue is for that anchor.\n- ``since`` / ``until`` — unix-second bounds on the event time.\n\n``limit`` is clamped server-side (see ``AuditLog.MAX_PAGE_SIZE``).",
        "operationId": "list_audit_events_audit_events__get",
        "parameters": [
          {
            "name": "username",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Username"
            }
          },
          {
            "name": "action",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Action"
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Category"
            }
          },
          {
            "name": "outcome",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Outcome"
            }
          },
          {
            "name": "anchor_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anchor Id"
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Audit Events Audit Events  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/audit-events/{event_id}/": {
      "get": {
        "tags": [
          "audit",
          "mongo"
        ],
        "summary": "Get Audit Event",
        "description": "Fetch a single audit event by its stringified ``_id``.",
        "operationId": "get_audit_event_audit_events__event_id___get",
        "parameters": [
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Event Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Audit Event Audit Events  Event Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/atlas-stream/status/": {
      "get": {
        "tags": [
          "atlas-stream"
        ],
        "summary": "Get Status",
        "description": "Upstream connection state + per-scope counters + the persisted\nsubscription rows. One call drives the admin panel.",
        "operationId": "get_status_atlas_stream_status__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Status Atlas Stream Status  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/atlas-stream/subscriptions/": {
      "post": {
        "tags": [
          "atlas-stream"
        ],
        "summary": "Create Subscription",
        "description": "Register (idempotent) a scoped result subscription. 400 on an\nunscoped scope or unknown sink.",
        "operationId": "create_subscription_atlas_stream_subscriptions__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriptionCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Create Subscription Atlas Stream Subscriptions  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/atlas-stream/subscriptions/{sub_id}/": {
      "patch": {
        "tags": [
          "atlas-stream"
        ],
        "summary": "Patch Subscription",
        "operationId": "patch_subscription_atlas_stream_subscriptions__sub_id___patch",
        "parameters": [
          {
            "name": "sub_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Sub Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriptionPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Patch Subscription Atlas Stream Subscriptions  Sub Id   Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "atlas-stream"
        ],
        "summary": "Delete Subscription",
        "operationId": "delete_subscription_atlas_stream_subscriptions__sub_id___delete",
        "parameters": [
          {
            "name": "sub_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Sub Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Delete Subscription Atlas Stream Subscriptions  Sub Id   Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/login": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Login",
        "description": "Verify credentials, set the session cookie, return the user.\n\nGeneric 401 on any failure — never leak whether the username\nexists. Audited (``auth.login``) on both the success and the\nfailed path; recorded explicitly rather than via the dependency\nbecause there is no actor until this call succeeds.",
        "operationId": "login_auth_login_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Login Auth Login Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/register": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Register",
        "description": "Self-serve signup. Creates a ``viewer`` and auto-logs in.\n\nAdmins are still admin-created via ``POST /auth/users/``.\nSelf-registration intentionally has no role field on the wire.\nAudited (``auth.register``); recorded explicitly since the actor\nonly comes into existence as a result of this call.",
        "operationId": "register_auth_register_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Register Auth Register Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/forgot-password": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Forgot Password",
        "description": "Public self-service reset request.\n\n**Non-enumerating**: always returns the same generic 200 whether or\nnot the identifier matches an account (or whether that account even\nhas an email). Only when there's a real match *with* an email — and\nthe per-account throttle hasn't tripped — do we actually mint a\ntoken and send the link. Audited (``auth.forgot_password``).",
        "operationId": "forgot_password_auth_forgot_password_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgotPasswordPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Forgot Password Auth Forgot Password Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/reset-password": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Reset Password",
        "description": "Public reset completion — consume a token, set the new password.\n\nThe token is single-use and time-boxed; a bad / expired / already-\nused token gets a generic 400. On success every other outstanding\ntoken for the account is also burned. Does not auto-login — the user\nsigns in with the new password. Audited (``auth.password_reset``).",
        "operationId": "reset_password_auth_reset_password_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Reset Password Auth Reset Password Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/logout": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Logout",
        "operationId": "logout_auth_logout_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Logout Auth Logout Post"
                }
              }
            }
          }
        }
      }
    },
    "/auth/me": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "Me",
        "operationId": "me_auth_me_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Me Auth Me Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "auth"
        ],
        "summary": "Update Me",
        "description": "Patch the current user's preferences (shallow merge).",
        "operationId": "update_me_auth_me_patch",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreferencesPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Update Me Auth Me Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/me/password": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Change Password",
        "operationId": "change_password_auth_me_password_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordChangePayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Change Password Auth Me Password Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/me/email": {
      "patch": {
        "tags": [
          "auth"
        ],
        "summary": "Update Email",
        "description": "Set or clear the caller's email. Optional, but required to use\nthe self-service password-reset flow. Unique when set.",
        "operationId": "update_email_auth_me_email_patch",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Update Email Auth Me Email Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/me/api-key": {
      "patch": {
        "tags": [
          "auth"
        ],
        "summary": "Update Api Key",
        "description": "Set or clear the caller's RIPE Atlas API key.\n\nThe stored value is never echoed back; the response contains a\n``ripe_atlas_api_key.preview`` (last 4 chars) and ``set`` boolean.",
        "operationId": "update_api_key_auth_me_api_key_patch",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Update Api Key Auth Me Api Key Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/me/api-key/test": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Test Api Key",
        "description": "Probe the caller's stored RIPE Atlas API key against the real\nAtlas API and report whether it can read and create measurements.\n\nTwo probes, no side effects on RIPE:\n\n1. ``GET /api/v2/measurements/my/`` — basic auth check. If this\n   401s the key value itself is wrong, expired, or revoked.\n2. ``POST /api/v2/measurements/`` with an empty body — probes\n   the create-measurement permission. RIPE evaluates auth +\n   permissions **before** payload validation, so:\n     * 401 → key authenticates but lacks the create permission.\n     * 400 / 422 → has the create permission; payload was\n       rejected for shape reasons (which is what we want).\n\nOne-off vs recurring share the same create-measurement\npermission on RIPE's side; we don't try to distinguish them.\n\nReturns ``{ok, read_ok, create_ok, http_read, http_create, hint}``.\nRead-only — never actually creates a measurement.",
        "operationId": "test_api_key_auth_me_api_key_test_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Test Api Key Auth Me Api Key Test Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/users/": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "List Users",
        "operationId": "list_users_auth_users__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Users Auth Users  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Create User",
        "operationId": "create_user_auth_users__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserPayload"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Create User Auth Users  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/users/{username}": {
      "patch": {
        "tags": [
          "auth"
        ],
        "summary": "Update User",
        "operationId": "update_user_auth_users__username__patch",
        "parameters": [
          {
            "name": "username",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Username"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Update User Auth Users  Username  Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "auth"
        ],
        "summary": "Delete User",
        "operationId": "delete_user_auth_users__username__delete",
        "parameters": [
          {
            "name": "username",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Username"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Delete User Auth Users  Username  Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/users/{username}/password": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Admin Reset Password",
        "operationId": "admin_reset_password_auth_users__username__password_post",
        "parameters": [
          {
            "name": "username",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Username"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminPasswordResetPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Reset Password Auth Users  Username  Password Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/users/{username}/send-reset": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Admin Send Reset",
        "description": "Admin-triggered reset: email the user a single-use reset link\ninstead of setting a password by hand. Requires the target to have\nan email on file. The admin (trusted) gets a truthful result.",
        "operationId": "admin_send_reset_auth_users__username__send_reset_post",
        "parameters": [
          {
            "name": "username",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Username"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Send Reset Auth Users  Username  Send Reset Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/account/api-keys/": {
      "post": {
        "tags": [
          "auth",
          "user_api_keys"
        ],
        "summary": "Create Key",
        "description": "Issue a new API key for the calling user.\n\nReturns the persisted doc shape *including the plaintext*\n``secret`` field — surfaced exactly once. The frontend is\nexpected to show it in a reveal-once dialog and never store it.\n\nReturns 400 on validation failure (empty label, unknown scope,\npast-dated expiry, etc.) with a specific detail string the\ncreation form can echo back to the user.",
        "operationId": "create_key_account_api_keys__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateKeyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Create Key Account Api Keys  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "auth",
          "user_api_keys"
        ],
        "summary": "List Keys",
        "description": "List the calling user's own keys, newest first.\n\n``include_revoked=true`` includes soft-deleted keys; default\nhides them. Each row carries the public view (no ``hash``).",
        "operationId": "list_keys_account_api_keys__get",
        "parameters": [
          {
            "name": "include_revoked",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Revoked"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Keys Account Api Keys  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/account/api-keys/{key_id}": {
      "delete": {
        "tags": [
          "auth",
          "user_api_keys"
        ],
        "summary": "Revoke Key",
        "description": "Soft-revoke one of the calling user's keys.\n\nIdempotent — revoking an already-revoked key returns the same\ndoc unchanged. Returns 404 when the key doesn't exist OR\nbelongs to a different user (both cases share a response so a\ncaller can't probe for foreign key ids).",
        "operationId": "revoke_key_account_api_keys__key_id__delete",
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Key Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Revoke Key Account Api Keys  Key Id  Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/api-keys/stats/": {
      "get": {
        "tags": [
          "auth",
          "user_api_keys"
        ],
        "summary": "Get Admin Stats",
        "description": "Counts blob for the admin dashboard: total, active, revoked,\nexpired, used-in-last-24h / 7d. Single ``$facet`` aggregation\nunder the hood — one round-trip regardless of branch count.",
        "operationId": "get_admin_stats_admin_api_keys_stats__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Admin Stats Admin Api Keys Stats  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/api-keys/": {
      "get": {
        "tags": [
          "auth",
          "user_api_keys"
        ],
        "summary": "List All Keys",
        "description": "Cross-user listing with optional filters.\n\n``?username=alice`` narrows to one user. ``?status=`` is one of\n``active`` / ``revoked`` / ``expired`` (omit for all). Newest-\nfirst, paginated. Each row is the public view (hash stripped).",
        "operationId": "list_all_keys_admin_api_keys__get",
        "parameters": [
          {
            "name": "username",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Username"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "active",
                    "revoked",
                    "expired"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "active = not revoked + not expired; revoked = soft-deleted; expired = past expires_at",
              "title": "Status"
            },
            "description": "active = not revoked + not expired; revoked = soft-deleted; expired = past expires_at"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List All Keys Admin Api Keys  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/api-keys/{key_id}": {
      "delete": {
        "tags": [
          "auth",
          "user_api_keys"
        ],
        "summary": "Admin Revoke Key",
        "description": "Revoke any user's key. Used by admins as the ban-hammer for\na leaked secret reported through other channels.\n\nRecords ``revoked_by`` (the admin's username) on the doc — gives\nthe audit trail a \"who killed this\" pointer alongside the\n\"who created it\". Returns 404 when the key id doesn't exist.",
        "operationId": "admin_revoke_key_admin_api_keys__key_id__delete",
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Key Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Revoke Key Admin Api Keys  Key Id  Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/comments/": {
      "get": {
        "tags": [
          "comments",
          "mongo"
        ],
        "summary": "List Comments",
        "description": "Authenticated list, newest-first, scoped to one\n``(collection, doc_id)`` pair.\n\nThe viewer's username gates the privacy filter — public comments\nreturn for everyone authenticated, private comments only to their\nauthor. Anonymous callers get 401 from\n:func:`api.auth.get_current_user`.",
        "operationId": "list_comments_comments__get",
        "parameters": [
          {
            "name": "collection",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Collection"
            }
          },
          {
            "name": "doc_id",
            "in": "query",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ],
              "title": "Doc Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Comments Comments  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "comments",
          "mongo"
        ],
        "summary": "Create Comment",
        "description": "Authenticated. Validates the target row exists in its collection\nso a typo can't create an orphan comment.",
        "operationId": "create_comment_comments__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Create Comment Comments  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/comments/counts/": {
      "post": {
        "tags": [
          "comments",
          "mongo"
        ],
        "summary": "Counts For Targets",
        "description": "Batched ``{<collection>:<doc_id>: <count>}`` map for the\nper-row \"N comments\" badge. Privacy-filtered against the viewer\n— counts reflect what they would see in\n:func:`list_comments`.",
        "operationId": "counts_for_targets_comments_counts__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api__routers__comments__CountsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "integer"
                  },
                  "title": "Response Counts For Targets Comments Counts  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/comments/{comment_id}": {
      "patch": {
        "tags": [
          "comments",
          "mongo"
        ],
        "summary": "Update Comment",
        "description": "Author-only edit. Patches ``body`` and/or ``private`` —\n``model_fields_set`` lets the caller change either independently.\n``edited`` flips on body changes only.",
        "operationId": "update_comment_comments__comment_id__patch",
        "parameters": [
          {
            "name": "comment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Comment Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Update Comment Comments  Comment Id  Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "comments",
          "mongo"
        ],
        "summary": "Delete Comment",
        "description": "Author OR admin. Hard-delete; no tombstone.",
        "operationId": "delete_comment_comments__comment_id__delete",
        "parameters": [
          {
            "name": "comment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Comment Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Delete Comment Comments  Comment Id  Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/atlas/countries/": {
      "get": {
        "tags": [
          "countries",
          "mongo"
        ],
        "summary": "List Countries",
        "description": "List every country, sorted by common name.\n\nTwo shapes:\n\n- ``details=false`` (default) — slim picker payload, ~250 entries\n  × ~80 bytes: ``{code, name, region, flag}``. Used by the\n  regions admin dialog.\n- ``details=true`` — full envelope per row, identical in shape to\n  :func:`get_country` (``{code, data, meta}``). Used by the\n  countries view in the UI; mirror of the legacy\n  ``/locations/countries/?details=true`` semantics.",
        "operationId": "list_countries_atlas_countries__get",
        "parameters": [
          {
            "name": "details",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Details"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Countries Atlas Countries  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/atlas/countries/{cca2}/": {
      "get": {
        "tags": [
          "countries",
          "mongo"
        ],
        "summary": "Get Country",
        "description": "Full country envelope for one cca2. 404 on miss.",
        "operationId": "get_country_atlas_countries__cca2___get",
        "parameters": [
          {
            "name": "cca2",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cca2"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Country Atlas Countries  Cca2   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/dashboard/summary/": {
      "get": {
        "tags": [
          "dashboard",
          "mongo"
        ],
        "summary": "Get Summary",
        "description": "Composite payload — all three sections in one round trip.\n\nThe dashboard page calls this on mount; sub-pages call the\nsection-specific endpoints below if they need fresher data.",
        "operationId": "get_summary_dashboard_summary__get",
        "parameters": [
          {
            "name": "refresh",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Refresh"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Summary Dashboard Summary  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/dashboard/credits/": {
      "get": {
        "tags": [
          "dashboard",
          "mongo"
        ],
        "summary": "Get Credits",
        "operationId": "get_credits_dashboard_credits__get",
        "parameters": [
          {
            "name": "refresh",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Refresh"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Credits Dashboard Credits  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/dashboard/probes/": {
      "get": {
        "tags": [
          "dashboard",
          "mongo"
        ],
        "summary": "Get Probes",
        "operationId": "get_probes_dashboard_probes__get",
        "parameters": [
          {
            "name": "refresh",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Refresh"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Probes Dashboard Probes  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/dashboard/measurements/": {
      "get": {
        "tags": [
          "dashboard",
          "mongo"
        ],
        "summary": "Get Measurements",
        "operationId": "get_measurements_dashboard_measurements__get",
        "parameters": [
          {
            "name": "refresh",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Refresh"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Measurements Dashboard Measurements  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/dashboard/refresh/": {
      "post": {
        "tags": [
          "dashboard",
          "mongo"
        ],
        "summary": "Post Refresh",
        "description": "Drop every cached row for the calling user.\n\nThe next ``/summary/`` (or any section endpoint) is a full\nre-fetch from RIPE. Returns the count of cache rows deleted —\ninformational, mostly useful for verifying the request landed.",
        "operationId": "post_refresh_dashboard_refresh__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Post Refresh Dashboard Refresh  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/dashboard/measurements/{measurement_id}/stop": {
      "post": {
        "tags": [
          "dashboard",
          "mongo"
        ],
        "summary": "Post Stop Measurement",
        "description": "Stop one of the caller's ongoing measurements.\n\nOwnership is enforced upstream — RIPE returns 403/404 when the\ncaller doesn't own the measurement, mapped here to the matching\nHTTP status. On success the user's measurements / summary cache\nrows are dropped so the next dashboard read shows the\n``Stopped`` state.\n\nPOST (not DELETE) on our side — consistent with\n``POST /dashboard/refresh/`` and avoids middleware that's strict\nabout DELETE bodies. The action verb in the URL keeps the intent\nobvious.",
        "operationId": "post_stop_measurement_dashboard_measurements__measurement_id__stop_post",
        "parameters": [
          {
            "name": "measurement_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Measurement Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Post Stop Measurement Dashboard Measurements  Measurement Id  Stop Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/dnsmon/anchors/": {
      "get": {
        "tags": [
          "dnsmon",
          "mongo"
        ],
        "summary": "List DNSMON anchors",
        "description": "Current DNSMON anchors (hostname-sorted).\n\n``active`` only by default; ``?include_removed=true`` also returns\nsoft-removed rows (kept for forensics). ``updated`` is the most\nrecent per-row refresh stamp so the UI can show data freshness.",
        "operationId": "get_dnsmon_anchors_dnsmon_anchors__get",
        "parameters": [
          {
            "name": "include_removed",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Removed"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Dnsmon Anchors Dnsmon Anchors  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/dnsmon/anchors/history/": {
      "get": {
        "tags": [
          "dnsmon",
          "mongo"
        ],
        "summary": "DNSMON membership changes",
        "description": "Append-only added/removed events, newest first. Optional\n``?anchor_id=`` filters to one anchor's churn history.",
        "operationId": "get_dnsmon_anchor_history_dnsmon_anchors_history__get",
        "parameters": [
          {
            "name": "anchor_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anchor Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Dnsmon Anchor History Dnsmon Anchors History  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/dnsmon/replacement-candidates/": {
      "get": {
        "tags": [
          "dnsmon",
          "mongo"
        ],
        "summary": "DNSMON anchors with active health issues",
        "description": "Active DNSMON anchors that currently carry active health\nissues — the anchors that should be replaced — each with its open\nissue set (key / opened-at / context) for the reasons display.\n\nStaff-gated to match the ``/anchors-health/`` posture (issue\ncontext is operational detail). Read-only — choosing the\n*replacement* anchor is a separate task.",
        "operationId": "get_dnsmon_replacement_candidates_dnsmon_replacement_candidates__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Dnsmon Replacement Candidates Dnsmon Replacement Candidates  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/dnsmon/replacement-candidates/{anchor_id}/suggestions/": {
      "get": {
        "tags": [
          "dnsmon",
          "mongo"
        ],
        "summary": "Ranked replacement suggestions for a failing anchor",
        "description": "Healthy substitute anchors for one failing DNSMON anchor,\nranked same-country → same-RIR → same-continent → global then by\ndistance. ``?stability=30d|90d`` sets the quality bar. Staff-gated.\n400 on an unknown anchor / bad stability.",
        "operationId": "get_dnsmon_suggestions_dnsmon_replacement_candidates__anchor_id__suggestions__get",
        "parameters": [
          {
            "name": "anchor_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Anchor Id"
            }
          },
          {
            "name": "stability",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "30d",
              "title": "Stability"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Dnsmon Suggestions Dnsmon Replacement Candidates  Anchor Id  Suggestions  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/dnsmon/replacements/": {
      "get": {
        "tags": [
          "dnsmon",
          "mongo"
        ],
        "summary": "List tracked replacement decisions",
        "description": "Tracked replacement decisions, newest first. Optional\n``?status_=proposed|approved|done|dismissed`` filter.",
        "operationId": "list_dnsmon_replacements_dnsmon_replacements__get",
        "parameters": [
          {
            "name": "status_",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status "
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Dnsmon Replacements Dnsmon Replacements  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "dnsmon",
          "mongo"
        ],
        "summary": "Propose a replacement",
        "description": "Record a ``proposed`` replacement. Admin-gated. 409 when an\nopen decision already exists for the candidate; 422 when the\ncandidate isn't a current failing anchor or the replacement isn't\neligible.",
        "operationId": "create_dnsmon_replacement_dnsmon_replacements__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplacementCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Create Dnsmon Replacement Dnsmon Replacements  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/dnsmon/replacements/{decision_id}/": {
      "patch": {
        "tags": [
          "dnsmon",
          "mongo"
        ],
        "summary": "Transition a replacement decision",
        "description": "Advance a decision (``approved`` / ``done`` / ``dismissed``),\nappending an audit event. Admin-gated. 404 unknown id; 400 bad\nid / illegal transition.",
        "operationId": "patch_dnsmon_replacement_dnsmon_replacements__decision_id___patch",
        "parameters": [
          {
            "name": "decision_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Decision Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplacementPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Patch Dnsmon Replacement Dnsmon Replacements  Decision Id   Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/dnsmon/refresh/": {
      "post": {
        "tags": [
          "dnsmon",
          "mongo"
        ],
        "summary": "Refresh the DNSMON anchor set",
        "description": "Admin-panel trigger: pull the upstream list and reconcile\n``db.anchors_dnsmon`` (sanity-guarded; soft-remove + add/removed\nhistory). Single HTTP call + small bulk-write. Wrapped in\n:func:`run_and_record` so it lands in ``db.task_history`` next to\nthe scheduled run (``trigger=\"manual\"``).",
        "operationId": "refresh_dnsmon_anchors_dnsmon_refresh__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Refresh Dnsmon Anchors Dnsmon Refresh  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/domains/{domain}/": {
      "get": {
        "tags": [
          "domains",
          "domains",
          "hostnames",
          "mongo"
        ],
        "summary": "Get domain info",
        "description": "Domain DNS-chase record cached in ``db.domains`` and sourced\nfrom RIPE STAT ``dns-chain``.\n\nPass ``?refresh=true`` to force a re-fetch from RIPE STAT.",
        "operationId": "get_domain_info_domains__domain___get",
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Domain"
            }
          },
          {
            "name": "refresh",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Refresh"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/": {
      "get": {
        "tags": [
          "events",
          "events",
          "mongo"
        ],
        "summary": "Get Events",
        "description": "Filtered list of connection events — Mongo-backed.\n\nReplaces the legacy CouchDB-backed implementation; same wire\nsurface (filter set + envelope shape) but per-row shape is now\nflat (no ``data`` wrapper) — that's how events are stored in\n``db.events_connections``.\n\nSee :meth:`EventsConnections.list_filtered` for the mode-by-mode\nbehaviour (``delta`` / ``count_only`` / ``explain``).",
        "operationId": "get_events_events__get",
        "parameters": [
          {
            "name": "minutes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 60,
              "title": "Minutes"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "name": "stop",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Stop"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Type"
            }
          },
          {
            "name": "controller",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Controller"
            }
          },
          {
            "name": "probe_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Probe Id"
            }
          },
          {
            "name": "delta",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Delta"
            }
          },
          {
            "name": "count_only",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Count Only"
            }
          },
          {
            "name": "explain",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Explain"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/buckets/": {
      "get": {
        "tags": [
          "events",
          "events",
          "mongo"
        ],
        "summary": "Get Event Buckets",
        "description": "Per-bucket connect/disconnect counts for charting.\n\nServer-side aggregation — bypasses the 25 000-row cap on the\nraw-events surface, which truncated wide time windows to just\ntheir most-recent tail. The aggregation runs ``$group`` over\nthe indexed ``timestamp`` field; result size is bounded by the\nbucket count (typically ~24, low hundreds at worst), not by\nthe event count.\n\nWrapped in :func:`asyncio.to_thread` because the PyMongo\naggregation is a blocking call — without the thread shim the\nFastAPI event loop would stall for the duration of every wide-\nwindow query and queue all other requests behind it. The\naggregation itself has a 120 s ``maxTimeMS`` ceiling\n(see :meth:`EventsConnections.list_buckets`).\n\nReturns ``{count, time, query, bucket_seconds, results}`` where\neach ``results`` entry is ``{start, connect, disconnect}``,\noldest-first. Empty buckets aren't emitted — the frontend pads\nthem client-side if a flat axis is wanted.",
        "operationId": "get_event_buckets_events_buckets__get",
        "parameters": [
          {
            "name": "bucket_seconds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 300,
              "title": "Bucket Seconds"
            }
          },
          {
            "name": "minutes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 60,
              "title": "Minutes"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "name": "stop",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Stop"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Type"
            }
          },
          {
            "name": "controller",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Controller"
            }
          },
          {
            "name": "probe_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Probe Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/connections/series/": {
      "get": {
        "tags": [
          "events",
          "events",
          "mongo"
        ],
        "summary": "Get Connections Series",
        "description": "Public daily-stats series for the connection-events trends view.\n\nDaily-coverage rows (incl. the per-day ``stats`` block) in an\ninclusive ``YYYY-MM-DD`` window, oldest-first. No auth gate — same\nposture as ``/events/buckets/`` and the measurements-meta /\nprobe-archive series: aggregate counts over public RIPE info.\n\nLives on the public events router (prefix ``/events``) rather than\nthe admin ``/events/connections`` router; the path does not\ncollide with that router's ``/daily/{date}/`` (different segment\nafter the shared prefix). 400 on a bad / inverted / over-cap\nrange.\n\nWrapped in :func:`asyncio.to_thread` because the underlying\nPyMongo range scan is a blocking call.",
        "operationId": "get_connections_series_events_connections_series__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Until"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Connections Series Events Connections Series  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/connections/missed-disconnects": {
      "get": {
        "tags": [
          "events",
          "events",
          "mongo"
        ],
        "summary": "Get Missed Disconnects",
        "description": "Missed-disconnect detection + breakdown for an inclusive\n``YYYY-MM-DD`` window.\n\nA missed disconnect is a session whose closing ``disconnect`` RIPE\nnever delivered (two ``connect`` events in a row for one probe).\nReturns totals + per-controller / country / ASN / probe-type /\ncontroller-handoff rankings (each with a ``rate``) + a sample of\noccurrences — see\n:meth:`EventsConnections.missed_disconnects_report`.\n\nStaff-gated (a multi-day scan can be heavy) and wrapped in\n``asyncio.to_thread``. 400 on a bad / inverted / over-cap range.",
        "operationId": "get_missed_disconnects_events_connections_missed_disconnects_get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Until"
            }
          },
          {
            "name": "top_n",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 25,
              "title": "Top N"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Missed Disconnects Events Connections Missed Disconnects Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/uptimes/series/": {
      "get": {
        "tags": [
          "events",
          "events",
          "mongo"
        ],
        "summary": "Get Uptimes Series",
        "description": "Public daily-stats series for the probe-uptime trends view.\n\nDaily-coverage rows (incl. the per-day ``stats`` block) of\n``db.events_uptimes_daily`` in an inclusive ``YYYY-MM-DD`` window,\noldest-first. No auth gate — same posture as the connection-events\nseries (aggregate counts over public RIPE info).\n\nLives on the public events router (prefix ``/events``) rather than\nthe admin ``/events/uptimes`` router; the path doesn't collide with\nthat router's ``/daily/{date}/`` (different segment after the shared\nprefix). 400 on a bad / inverted / over-cap range.\n\nWrapped in :func:`asyncio.to_thread` because the underlying PyMongo\nrange scan is a blocking call.",
        "operationId": "get_uptimes_series_events_uptimes_series__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Until"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Uptimes Series Events Uptimes Series  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/database/overview": {
      "get": {
        "tags": [
          "admin",
          "mongo"
        ],
        "summary": "Get Overview",
        "description": "Server info + db-level stats + per-collection list. One\nround-trip per Mongo command — page-load cost is bounded by the\nnumber of collections, not their size.",
        "operationId": "get_overview_admin_database_overview_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Overview Admin Database Overview Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/database/collections/{name}": {
      "get": {
        "tags": [
          "admin",
          "mongo"
        ],
        "summary": "Get Collection Detail",
        "description": "Drill-down for a single collection: index list with sizes,\nplus the most recent docs (truncated per-doc — see\n:data:`api.atlas.database_stats._PREVIEW_DOC_MAX_BYTES`).",
        "operationId": "get_collection_detail_admin_database_collections__name__get",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Name"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Collection Detail Admin Database Collections  Name  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/database/history": {
      "get": {
        "tags": [
          "admin",
          "mongo"
        ],
        "summary": "Get History",
        "description": "Last ``days`` daily snapshots from ``db.database_stats_history``.\nPowers the per-collection growth sparklines on the dashboard.\n\n``days`` is clamped to 400 server-side (the retention horizon).",
        "operationId": "get_history_admin_database_history_get",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 30,
              "title": "Days"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response Get History Admin Database History Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/workers/": {
      "get": {
        "tags": [
          "admin",
          "workers"
        ],
        "summary": "List Workers",
        "description": "Live snapshot of all in-process workers.\n\nSync route — FastAPI offloads it to the threadpool, so the\nblocking Mongo finds are fine here. Each descriptor carries the\nconsumer-task liveness, in-memory queue depth, the in-flight\nitem, and the DB-backed ``queued`` / ``running`` rows (the\nactionable \"should be moving\" set) plus a deep-link to the\nfull per-subsystem admin panel.\n\nEach descriptor is computed defensively: if one fails (e.g. a Mongo\nread times out under a pathological backlog) it degrades to a stub\nrather than failing the whole snapshot.",
        "operationId": "list_workers_admin_workers__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Workers Admin Workers  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/workers/{key}/stop-all": {
      "post": {
        "tags": [
          "admin",
          "workers"
        ],
        "summary": "Stop All Active",
        "description": "Stop **every** queued/running row in this worker's queue.\n\nIterates the DB-backed active rows and invokes the subsystem's\n``request_stop(...)`` for each — the same cooperative-stop\nmethod the per-row Stop button calls. Queued rows are cancelled\nbefore they start; running rows finish with partial progress kept.\nOne audit row per click, with counts in the result. Idempotent —\nre-running after the rows have already stopped finds nothing and\nreturns a no-op summary.\n\n400 for ``enrichment`` / ``measurements_latest_backfill`` (no\nper-row stop — both workers are globally rate-paced, no per-entity\njob to cancel); 404 for an unknown key.",
        "operationId": "stop_all_active_admin_workers__key__stop_all_post",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Key"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Stop All Active Admin Workers  Key  Stop All Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/workers/{key}/recover": {
      "post": {
        "tags": [
          "admin",
          "workers"
        ],
        "summary": "Recover Worker",
        "description": "Re-enqueue orphaned ``queued`` / ``running`` jobs for one\nworker. Dispatches to that worker's own recovery (the same one\nits ``start()`` runs). Idempotent — safe to click any time, a\ndouble-enqueue no-ops at the claim.",
        "operationId": "recover_worker_admin_workers__key__recover_post",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Key"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Recover Worker Admin Workers  Key  Recover Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/enrichment/": {
      "get": {
        "tags": [
          "admin",
          "enrichment"
        ],
        "summary": "Enrichment Summary",
        "description": "Ledger rollup + today's shared IPLocate budget + worker\nsnapshot. Drives the admin panel header.",
        "operationId": "enrichment_summary_admin_enrichment__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Enrichment Summary Admin Enrichment  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/enrichment/targets": {
      "get": {
        "tags": [
          "admin",
          "enrichment"
        ],
        "summary": "List Targets",
        "description": "Paginated ledger rows, newest-seen first. Optional ``type``\n(``ip``/``asn``/``host``) and ``status`` filters.",
        "operationId": "list_targets_admin_enrichment_targets_get",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Type"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Targets Admin Enrichment Targets Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/enrichment/refresh": {
      "post": {
        "tags": [
          "admin",
          "enrichment"
        ],
        "summary": "Force Refresh",
        "description": "Make matching ledger rows due now (manual staleness bust).",
        "operationId": "force_refresh_admin_enrichment_refresh_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api__routers__enrichment__RefreshBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Force Refresh Admin Enrichment Refresh Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/enrichment/discover": {
      "post": {
        "tags": [
          "admin",
          "enrichment"
        ],
        "summary": "Run Discovery",
        "description": "Run the discovery scan now (off the event loop — it's blocking\nMongo work).",
        "operationId": "run_discovery_admin_enrichment_discover_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Run Discovery Admin Enrichment Discover Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/enrichment/discover-deep": {
      "post": {
        "tags": [
          "admin",
          "enrichment"
        ],
        "summary": "Run Deep Discovery",
        "description": "Run the phase-2 deep scan now (traceroute hop IPs + DNS A/AAAA\nanswers out of ``measurements_latest``).\n\nBounded + incremental like the scheduled job — one tick processes\nup to ``EnrichmentSettings.DEEP_SCAN_DOC_CAP`` new rows and\nadvances the watermark, so repeated clicks walk the backlog.\nOff the event loop (heavier blocking Mongo work). The only\non-demand trigger when the scheduler is disabled (it otherwise\nonly runs via ``ENRICHMENT_DEEP_SCAN_CRON``).",
        "operationId": "run_deep_discovery_admin_enrichment_discover_deep_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Run Deep Discovery Admin Enrichment Discover Deep Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/enrichment/recover": {
      "post": {
        "tags": [
          "admin",
          "enrichment"
        ],
        "summary": "Recover",
        "description": "Requeue ledger rows stranded in ``running`` (worker crashed\nmid-item).",
        "operationId": "recover_admin_enrichment_recover_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Recover Admin Enrichment Recover Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/cities/": {
      "get": {
        "tags": [
          "cities",
          "mongo"
        ],
        "summary": "List Cities",
        "description": "Paginated city search.\n\nAll filters optional + AND-combined. ``q`` matches against\n``name`` or ``asciiname`` as a case-insensitive prefix.\nPopulation-DESC sort. Returns\n``{rows, total, limit, offset}`` so the frontend can render\na standard \"1–25 of 4,723\" footer.",
        "operationId": "list_cities_cities__get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "min_population",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Population"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 25,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Cities Cities  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/cities/countries/": {
      "get": {
        "tags": [
          "cities",
          "mongo"
        ],
        "summary": "List Country Counts",
        "description": "Distinct cca2s actually present in ``db.geonames_cities`` +\na count of cities per country. Drives the lookup view's\ncountry-filter dropdown so operators only see countries that\nwill produce a non-empty result set.",
        "operationId": "list_country_counts_cities_countries__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "type": "array",
                  "title": "Response List Country Counts Cities Countries  Get"
                }
              }
            }
          }
        }
      }
    },
    "/cities/{geoname_id}/": {
      "get": {
        "tags": [
          "cities",
          "mongo"
        ],
        "summary": "Get City",
        "description": "Single-city detail by geonameid.\n\nBundles the city row + ``nearest`` (top-10 closest other\ncities for the in-page browse list) + ``probes_count`` (so\nthe detail view can label its probe table without a fourth\nround-trip).",
        "operationId": "get_city_cities__geoname_id___get",
        "parameters": [
          {
            "name": "geoname_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Geoname Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get City Cities  Geoname Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/cities/{geoname_id}/probes/": {
      "get": {
        "tags": [
          "cities",
          "mongo"
        ],
        "summary": "List City Probes",
        "description": "Probes located in this city via ``enrichments.city``.\n\nCapped at 100 rows server-side; the city-detail view shows\n\"showing first 100\" + a link to the probe-list filtered to\nthe city for the truncated case.",
        "operationId": "list_city_probes_cities__geoname_id__probes__get",
        "parameters": [
          {
            "name": "geoname_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Geoname Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List City Probes Cities  Geoname Id  Probes  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/data-delay/stats/": {
      "get": {
        "tags": [
          "data-delay",
          "mongo"
        ],
        "summary": "Get Stats",
        "description": "Operator-header tiles: row count, last-24h count, the latest\nrow verbatim (drives the \"Current delay\" + buffer tiles), and\nthe oldest ``ts`` so the UI can render \"Data since YYYY-MM-DD\".",
        "operationId": "get_stats_data_delay_stats__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Get Stats Data Delay Stats  Get"
                }
              }
            }
          }
        }
      }
    },
    "/data-delay/incidents/": {
      "get": {
        "tags": [
          "data-delay",
          "mongo"
        ],
        "summary": "Get Incidents",
        "description": "Ingestion-delay incident spans — shades the chart on the delay\nview. Public, matching the rest of this router and the page it\nfeeds.",
        "operationId": "get_incidents_data_delay_incidents__get",
        "parameters": [
          {
            "name": "since_ts",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since Ts"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Incidents Data Delay Incidents  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/data-delay/series/": {
      "get": {
        "tags": [
          "data-delay",
          "mongo"
        ],
        "summary": "Get Series",
        "description": "Time-series rows for the chart. ``since_ts`` / ``until_ts``\nclamp the window (unix-seconds, both optional). ``limit`` is\nclamped server-side to 10000 so a runaway range can't drag the\nwhole collection over the wire. A span wider than the\nsubstrate's :attr:`DataDelay.MAX_RANGE_SEC` (90 days) returns\nHTTP 400 — defends against a paste-mistake on a URL deep-link\nasking Mongo to scan an unbounded index slice.\n\nNewest-first on the wire; the frontend chart reverses on\nrender.",
        "operationId": "get_series_data_delay_series__get",
        "parameters": [
          {
            "name": "since_ts",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since Ts"
            }
          },
          {
            "name": "until_ts",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until Ts"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 2000,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response Get Series Data Delay Series  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/measurements/v2/{msm_id}/": {
      "get": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Get Measurement",
        "description": "Cache-first measurement lookup. On hit returns the local row;\non miss / stale / ``?refresh=true`` falls through to RIPE,\nupserts, and returns the freshly-cached row.\n\nResponse wrapper keeps the legacy envelope shape the frontend\nalready consumes::\n\n    {\"data\": <RIPE envelope>, \"meta\": {...}}\n\nFor non-cacheable upstream statuses (private → 403,\nnot_found → 404, transient error → 502) the cache marker is\nstill written and the route maps to the appropriate HTTP code\nso the frontend can render a proper empty state.",
        "operationId": "get_measurement_measurements_v2__msm_id___get",
        "parameters": [
          {
            "name": "msm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Msm Id"
            }
          },
          {
            "name": "refresh",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Refresh"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Measurement Measurements V2  Msm Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/measurements/v2/{msm_id}/latest/": {
      "get": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Get Measurement Latest",
        "description": "Per-probe ``/latest`` results, cache-first for terminal\nmeasurements, live-through for ongoing ones.\n\nDecision tree:\n\n1. Look up the measurement's metadata (cache-first via the\n   same read-through as ``/measurements/v2/{id}/``).\n1b. Well-known (tag ``system-well-known-target``) + cached →\n   return the hourly-refreshed cached snapshot (these are ongoing\n   all-probes runs we deliberately cache rather than live-fetch).\n2. If the measurement is in a terminal status:\n   a. If we have cached result rows → return them.\n   b. Otherwise fetch RIPE, decode (DNS only), bulk-upsert,\n      return.\n3. If the measurement is ongoing → fetch RIPE and return\n   without caching. We don't persist results that are still\n   streaming.\n\nReturned shape matches RIPE's ``/measurements/{id}/latest/``\nresponse (a list of result rows). DNS rows additionally carry\na ``decoded`` field with the parsed abuf.",
        "operationId": "get_measurement_latest_measurements_v2__msm_id__latest__get",
        "parameters": [
          {
            "name": "msm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Msm Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response Get Measurement Latest Measurements V2  Msm Id  Latest  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/measurements/v2/": {
      "get": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "List Measurements",
        "description": "Local-only paginated list. Returns the same envelope shape as\nthe upstream RIPE ``/measurements/`` so the existing frontend's\npagination plumbing keeps working unchanged.\n\nFilters mirror the RIPE list endpoint's surface (``search`` /\n``type`` / ``target`` / ``af`` / ``status`` / ``is_oneoff`` /\n``sort``) plus ``builtin`` (``probes_requested == -1`` *and*\n``is_oneoff == false`` — a recurring measurement that runs on\nevery connected probe) and ``tag`` (match a measurement tag slug —\ne.g. ``system-well-known-target`` for the well-known list).\n``type`` and ``status`` are aliased on the wire to avoid shadowing\nPython builtins inside the function.",
        "operationId": "list_measurements_measurements_v2__get",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Page Size"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "-id",
              "title": "Sort"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Target"
            }
          },
          {
            "name": "af",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Af"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Type"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "is_oneoff",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Is Oneoff"
            }
          },
          {
            "name": "builtin",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Builtin"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tag"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Measurements Measurements V2  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/measurements/v2/types/": {
      "get": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "List Types",
        "description": "Distinct ``data.type`` values across cached rows. Powers the\ntype-filter dropdown in the list view.",
        "operationId": "list_types_measurements_v2_types__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array",
                  "title": "Response List Types Measurements V2 Types  Get"
                }
              }
            }
          }
        }
      }
    },
    "/measurements/v2/{msm_id}/participation/analyse": {
      "post": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Participation Analyse",
        "description": "Queue a ``participation_latest`` job: fetch + store the full\n``/latest/`` for an all-probes measurement. Returns immediately\nwith the job id; the frontend polls ``/participation/status`` and\nthen reads ``/participation/missing``.\n\n404 when the measurement is private / not found upstream; 400\nwhen it isn't an all-probes (``probes_requested == -1``)\nmeasurement; 503 when the import worker isn't running.",
        "operationId": "participation_analyse_measurements_v2__msm_id__participation_analyse_post",
        "parameters": [
          {
            "name": "msm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Msm Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Participation Analyse Measurements V2  Msm Id  Participation Analyse Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/measurements/v2/{msm_id}/participation/status": {
      "get": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Participation Status",
        "description": "Most-recent participation job for this measurement + the\nstored-latest snapshot freshness. Frontend polls this while a\njob is ``queued`` / ``running``; once ``success`` it reads\n``/participation/missing``.",
        "operationId": "participation_status_measurements_v2__msm_id__participation_status_get",
        "parameters": [
          {
            "name": "msm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Msm Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Participation Status Measurements V2  Msm Id  Participation Status Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/measurements/v2/{msm_id}/participation/missing": {
      "get": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Participation Missing",
        "description": "Connected-by-AF probes with no result for this all-probes\nmeasurement. Fast local set-diff; never persisted. 400 when the\nmeasurement isn't cached or isn't an all-probes measurement.",
        "operationId": "participation_missing_measurements_v2__msm_id__participation_missing_get",
        "parameters": [
          {
            "name": "msm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Msm Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Participation Missing Measurements V2  Msm Id  Participation Missing Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/measurements/v2/{msm_id}/participation/stop": {
      "post": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Participation Stop",
        "description": "Stop this measurement's most-recent participation job\n(cooperative). Logged-in — the operator who started Analyse can\nabort it without an admin (the generic stop route is admin-only).\n\nScoped to ``participation_latest`` jobs for this ``msm_id`` so a\nlogged-in user can't cancel arbitrary imports. A ``queued`` job is\ncancelled immediately; a ``running`` one is flagged and finishes\nas ``stopped`` (partial latest preserved) within ~one\nprogress-flush window. Note: the cooperative checkpoint is between\nstore chunks, so a stop lands fast during the store phase; the\nsingle RIPE fetch can't be interrupted mid-flight but is bounded\nby the RIPE HTTP timeout. 404 when there's no participation job\nfor this measurement; 409 when it already finished.",
        "operationId": "participation_stop_measurements_v2__msm_id__participation_stop_post",
        "parameters": [
          {
            "name": "msm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Msm Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Participation Stop Measurements V2  Msm Id  Participation Stop Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/measurements-latest/by-probe/{prb_id}/": {
      "get": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Measurements Latest For Probe",
        "description": "Cached latest results for one probe — backs the probe Stats\ntab's \"latest result values\" panel. Newest-first; optional\n``?type=`` (ping/traceroute/dns/…). Each row carries a compact\ntype-aware ``metric`` (not the raw RIPE result blob). Logged-in,\nmatching the probe history / archive tabs. ``{count, results,\nlimit, offset}``.",
        "operationId": "measurements_latest_for_probe_measurements_latest_by_probe__prb_id___get",
        "parameters": [
          {
            "name": "prb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Prb Id"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Type"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 200,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Measurements Latest For Probe Measurements Latest By Probe  Prb Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements/stats/": {
      "get": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Admin Stats",
        "description": "Headline tiles for the admin panel: counts by status, freshness\nwindow, type breakdown, TTL.\n\nHot path — cheap (estimated count + tiny marker counts + indexed\nfind_one + the rollup snapshot). The expensive whole-collection\nfigures (``by_type`` + fresh/stale) come from the snapshot\nrefreshed by the daily-verify cron / the refresh endpoint below.",
        "operationId": "admin_stats_admin_measurements_stats__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Stats Admin Measurements Stats  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements/stats/refresh": {
      "post": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Admin Refresh Stats",
        "description": "Recompute the cache-overview snapshot now (DB-only, no RIPE).\n\nRuns the two whole-collection aggregations that don't scale to a\nlive request and persists the singleton rollup doc. Heavy at\n150M+ rows, so it's off the hot path and wrapped in\n:func:`run_and_record` (lands in ``db.task_history``). Returns the\nfreshly-written snapshot.",
        "operationId": "admin_refresh_stats_admin_measurements_stats_refresh_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Refresh Stats Admin Measurements Stats Refresh Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements/well-known/stats": {
      "get": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Well Known Stats",
        "description": "Breakdown of the cached well-known measurements (tag\n``system-well-known-target``): total + distinct targets + per-type /\nper-AF / per-status / top-target splits. Index-served over the\nwell-known partition, so cheap on the hot path.",
        "operationId": "well_known_stats_admin_measurements_well_known_stats_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Well Known Stats Admin Measurements Well Known Stats Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements/well-known/verify": {
      "post": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Well Known Verify",
        "description": "Verify the cached well-known set against RIPE Atlas: fetch every\nmeasurement tagged ``system-well-known-target`` from RIPE, compare to\nthe cache, and add anything missing. Returns\n``{found, added, existing, ids}`` (``added`` = how many were missing\nand have now been inserted). The RIPE call runs off the event loop.\nLatest results are refreshed separately by the hourly cron.",
        "operationId": "well_known_verify_admin_measurements_well_known_verify_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Well Known Verify Admin Measurements Well Known Verify Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements/imports/": {
      "get": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Admin List Imports",
        "description": "Recent import-job rows (newest first) + worker-runtime state\n(queue depth + currently-running job id) so the admin panel can\ndistinguish \"queued but waiting\" from \"actively running\".",
        "operationId": "admin_list_imports_admin_measurements_imports__get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin List Imports Admin Measurements Imports  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Admin Queue Import",
        "description": "Queue a bulk-import job for an inclusive id range. The\nbackground worker (single, sequential) picks it up from the\nnext ``queued`` poll; this endpoint returns immediately with\nthe job id so the admin panel can start polling for progress.",
        "operationId": "admin_queue_import_admin_measurements_imports__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportRangeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Queue Import Admin Measurements Imports  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements/imports/{job_id}": {
      "get": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Admin Get Import",
        "description": "Single import-job by id. Used by the admin panel's live-poll\nwhile a job is ``running`` so the progress numbers update without\nrefetching the whole jobs list.",
        "operationId": "admin_get_import_admin_measurements_imports__job_id__get",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Get Import Admin Measurements Imports  Job Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements/imports/{job_id}/stop": {
      "post": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Admin Stop Import",
        "description": "Stop a queued or running import job (cooperative).\n\nA ``queued`` job is cancelled immediately (flipped straight to\n``stopped``; the worker's claim filters on ``status: queued`` so\nit never starts). A ``running`` job gets a ``stop_requested``\nflag the worker honours at its next progress-flush checkpoint\n(within ~one flush window), finishing as ``stopped`` with\npartial progress preserved. Already-terminal jobs are a 409.\n\nReturns the request outcome\n(``{ok, outcome, status?}``) plus the worker snapshot so the\nadmin panel can refresh its busy state without a second call.",
        "operationId": "admin_stop_import_admin_measurements_imports__job_id__stop_post",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Stop Import Admin Measurements Imports  Job Id  Stop Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements/latest/redecode": {
      "post": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Admin Redecode Latest",
        "description": "Re-decode cached DNS rows from their verbatim ``result``.\n\nNo RIPE call; pure decoder-rerun over what we already have.\nUse after :mod:`api.atlas.dns_decode` evolves (new RR types,\nbug fix) to update the ``decoded`` view across the cache.\n\nReturns the per-call summary\n(``{processed, succeeded, failed}``) immediately. Synchronous —\nfor very large unscoped redecodes consider running with a\n``limit`` and chaining calls.",
        "operationId": "admin_redecode_latest_admin_measurements_latest_redecode_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RedecodeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Redecode Latest Admin Measurements Latest Redecode Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements/daily/": {
      "get": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Admin List Daily",
        "description": "Newest-first day-coverage rows + worker snapshot.\n\n``since`` / ``until`` are inclusive ``YYYY-MM-DD`` bounds on the\nrow ``_id``. The worker fields let the calendar surface the\nqueue-depth badge + worker-alive tripwire without a second call.",
        "operationId": "admin_list_daily_admin_measurements_daily__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 400,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin List Daily Admin Measurements Daily  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements/daily/verify-range": {
      "post": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Admin Verify Range",
        "description": "Queue a background ``verify_range`` job over a date window.\n\nEach day costs one paced RIPE count call; a year is ~365 of\nthem, so this is a worker job (not synchronous) — the calendar\nupdates as days settle. Range size is capped server-side.",
        "operationId": "admin_verify_range_admin_measurements_daily_verify_range_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyRangeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Verify Range Admin Measurements Daily Verify Range Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements/daily/fill": {
      "post": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Admin Fill Days",
        "description": "Queue a ``date_day`` job per date (gap-fill — no reprocess\nseal). The calendar's per-month / per-year Fill emits a date\nlist; we queue one job apiece. Idempotent: cache upserts dedup,\nso re-filling an already-covered day is cheap.",
        "operationId": "admin_fill_days_admin_measurements_daily_fill_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FillDaysRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Fill Days Admin Measurements Daily Fill Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements/daily/recover-stale": {
      "post": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Admin Recover Stale",
        "description": "Requeue jobs stuck in ``running`` from a dead worker.\n\nThe job queue is DB-durable (a restart re-claims ``queued``\nrows), but a worker that crashed mid-job leaves a ``running``\nrow nothing re-claims. Same recovery runs automatically at\nworker startup; this covers the worker-died-mid-life case.",
        "operationId": "admin_recover_stale_admin_measurements_daily_recover_stale_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Recover Stale Admin Measurements Daily Recover Stale Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements/daily/{date}/": {
      "get": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Admin Get Daily",
        "description": "Single day-coverage row. 404 when the day was never verified\n(the calendar renders that as ``unverified``).",
        "operationId": "admin_get_daily_admin_measurements_daily__date___get",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Get Daily Admin Measurements Daily  Date   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements/daily/{date}/verify": {
      "post": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Admin Verify Day",
        "description": "Recompute coverage for one UTC day synchronously.\n\nOne RIPE count call + one Mongo count — fast. 400 on a malformed\ndate; 502 when RIPE is unreachable (we deliberately don't persist\na bogus row, so the last-known-good coverage stays); 500 with a\ndescriptive ``detail`` on any other failure (Mongo timeout, stats\ncompute bug, etc.) so the operator sees the real reason in the\nadmin banner instead of a bare \"status 500\".",
        "operationId": "admin_verify_day_admin_measurements_daily__date__verify_post",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Verify Day Admin Measurements Daily  Date  Verify Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements/daily/{date}/reprocess": {
      "post": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Admin Reprocess Day",
        "description": "Force a full re-fetch of one UTC day from RIPE.\n\nDistinct from verify (recompute-only): flips the day to\n``queued`` + ``reprocess_pending``, then enqueues a ``date_day``\njob that walks the day's measurement list and upserts each. On\ncompletion the post-run verify seals the day with\n``reprocessed_at`` once it reaches 100%. Use when measurements\nlanded at RIPE after our cron window and were never cached.",
        "operationId": "admin_reprocess_day_admin_measurements_daily__date__reprocess_post",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Reprocess Day Admin Measurements Daily  Date  Reprocess Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements/daily/{date}/recompute-stats": {
      "post": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Admin Recompute Day Stats",
        "description": "Re-derive the day's ``stats`` block from cached measurements.\n\nDB-only (no RIPE) — recomputes distributions for the\nstart-cohort and rewrites ``stats`` / ``stats_recomputed_at`` on\nthe daily-coverage row in place. Wrapped in\n:func:`run_and_record` so it also lands in ``db.task_history``.\n400 when the day has no coverage row yet (verify it first) or on\na bad date.",
        "operationId": "admin_recompute_day_stats_admin_measurements_daily__date__recompute_stats_post",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Recompute Day Stats Admin Measurements Daily  Date  Recompute Stats Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements/daily/recompute-stats-range": {
      "post": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Admin Recompute Day Stats Range",
        "description": "Bulk-rebuild the ``stats`` block across a date window.\n\nLoops :meth:`MeasurementsMeta.recompute_day_stats`; days with no\ncoverage row are reported as ``skipped`` rather than aborting.\nDB-only, capped, wrapped in :func:`run_and_record`.",
        "operationId": "admin_recompute_day_stats_range_admin_measurements_daily_recompute_stats_range_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecomputeDayStatsRange"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Recompute Day Stats Range Admin Measurements Daily Recompute Stats Range Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements/daily/stats-coverage": {
      "get": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Admin Measurements Stats Coverage",
        "description": "Per-class daily-stats coverage over the retained window.\n\nPure read — one indexed ``_id``-range scan, no recompute. Returns\nthe :meth:`MeasurementsMeta.stats_coverage` blob\n(``schema_version`` + ``counts`` of\n``missing``/``stale_schema``/``stale_data``/``current`` +\n``stale_dates``). 400 on a bad / inverted range.",
        "operationId": "admin_measurements_stats_coverage_admin_measurements_daily_stats_coverage_get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "inclusive start, YYYY-MM-DD",
              "title": "Since"
            },
            "description": "inclusive start, YYYY-MM-DD"
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "inclusive end, YYYY-MM-DD",
              "title": "Until"
            },
            "description": "inclusive end, YYYY-MM-DD"
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Measurements Stats Coverage Admin Measurements Daily Stats Coverage Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements/daily/backfill-stale-stats": {
      "post": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Admin Measurements Backfill Stale Stats",
        "description": "Force an immediate newest-first recompute of stale daily-stats.\n\nThe on-demand burst counterpart to the drain cron — use right\nafter a deliberate ``STATS_SCHEMA_VERSION`` bump to converge now\nrather than waiting for the cron to grind through. DB-only,\nidempotent, bounded (``max_days`` server-clamped). Wrapped in\n:func:`run_and_record` so it lands in ``db.task_history``.",
        "operationId": "admin_measurements_backfill_stale_stats_admin_measurements_daily_backfill_stale_stats_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/BackfillStaleStats"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Measurements Backfill Stale Stats Admin Measurements Daily Backfill Stale Stats Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/measurements/v2/daily/series/": {
      "get": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Measurements Daily Series",
        "description": "Daily-coverage rows (incl. ``stats``) in an inclusive window,\noldest-first — the public trends-view fetch (mirrors\n``/probes-archive/series/``; aggregate counts over public RIPE\nmetadata, no auth gate). 400 on a bad / inverted / over-cap\nrange.",
        "operationId": "measurements_daily_series_measurements_v2_daily_series__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Until"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Measurements Daily Series Measurements V2 Daily Series  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements-latest/": {
      "get": {
        "tags": [
          "admin",
          "measurements-latest"
        ],
        "summary": "Latest Summary",
        "description": "Ledger rollup + worker snapshot. Drives the admin panel header.",
        "operationId": "latest_summary_admin_measurements_latest__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Latest Summary Admin Measurements Latest  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements-latest/rows": {
      "get": {
        "tags": [
          "admin",
          "measurements-latest"
        ],
        "summary": "List Rows",
        "description": "Paginated ledger rows. Optional ``status`` filter (``pending`` /\n``running`` / ``done`` / ``failed`` / ``dead``).",
        "operationId": "list_rows_admin_measurements_latest_rows_get",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Rows Admin Measurements Latest Rows Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements-latest/refresh": {
      "post": {
        "tags": [
          "admin",
          "measurements-latest"
        ],
        "summary": "Force Refresh",
        "description": "Make matching ledger rows due now (manual retry / unstick).",
        "operationId": "force_refresh_admin_measurements_latest_refresh_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api__routers__measurements_latest__RefreshBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Force Refresh Admin Measurements Latest Refresh Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements-latest/discover": {
      "post": {
        "tags": [
          "admin",
          "measurements-latest"
        ],
        "summary": "Run Discover",
        "description": "Trigger the discovery scan now (out-of-cycle). Idempotent —\nonly finds terminal+uncached measurements not already in the\nledger. Wrapped in ``asyncio.to_thread`` because the underlying\nscan is blocking (Mongo aggregate + per-id ``$setOnInsert``).",
        "operationId": "run_discover_admin_measurements_latest_discover_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Run Discover Admin Measurements Latest Discover Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/measurements-latest/recover": {
      "post": {
        "tags": [
          "admin",
          "measurements-latest"
        ],
        "summary": "Recover Stale",
        "description": "Flip rows stuck in ``running`` past the stale deadline back to\n``pending`` + due-now and re-enqueue them on the worker. Same\ncooperative contract as the workers-panel \"Recover stale\" action\nbut scoped only to this ledger.",
        "operationId": "recover_stale_admin_measurements_latest_recover_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Recover Stale Admin Measurements Latest Recover Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/connections/by-probe/{prb_id}/": {
      "get": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Connectivity For Probe",
        "description": "Per-probe connect/disconnect rollup for the probe Stats tab —\nuptime %, flap count, longest continuous uptime, MTBF, current\nstate, plus a capped newest-first event list for the timeline.\n\nLogged-in (matches the probe history / archive tabs; the rest of\nthis router is admin-only). ``since`` / ``until`` are unix-seconds\nbounds on event timestamp; ``since`` defaults to 90 days back so a\nno-arg call can't unbounded-scan a chatty probe.",
        "operationId": "connectivity_for_probe_events_connections_by_probe__prb_id___get",
        "parameters": [
          {
            "name": "prb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Prb Id"
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Connectivity For Probe Events Connections By Probe  Prb Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/connections/by-probe/{prb_id}/recent/": {
      "get": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Recent Connections For Probe",
        "description": "Latest ``limit`` (default 25) connect/disconnect events for one\nprobe plus a per-family IPv4/IPv6 connection prefix+ASN change\nrollup — feeds the probe-detail \"Connections\" tab. Logged-in (same\ngate as the ``by-probe`` Stats rollup above).",
        "operationId": "recent_connections_for_probe_events_connections_by_probe__prb_id__recent__get",
        "parameters": [
          {
            "name": "prb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Prb Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 25,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Recent Connections For Probe Events Connections By Probe  Prb Id  Recent  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/connections/stats/": {
      "get": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Get Stats",
        "description": "Header tiles for the admin panel — total events, last 24h\ncount, latest event/stored timestamps, last successful import\nrow, plus the worker queue snapshot + liveness.",
        "operationId": "get_stats_events_connections_stats__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Stats Events Connections Stats  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/connections/imports/": {
      "get": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "List Imports",
        "description": "Newest-first list of import-run rows. ``since`` / ``until`` are\ninclusive ``YYYY-MM-DD`` bounds on ``started_at``; ``trigger``\nnarrows to a single class of run (scheduled / manual / backfill).",
        "operationId": "list_imports_events_connections_imports__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "trigger",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Trigger"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Imports Events Connections Imports  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/connections/imports/{import_id}/": {
      "get": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Get Import",
        "description": "Single import-run row including counts + error if any.\n``import_id`` is the ``<trigger>_<started_ts>`` we generated at\nsubmission time.",
        "operationId": "get_import_events_connections_imports__import_id___get",
        "parameters": [
          {
            "name": "import_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Import Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Import Events Connections Imports  Import Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/connections/imports/{import_id}/stop": {
      "post": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Stop Import",
        "description": "Stop a running import (cooperative).\n\nEvents-connections writes no ``queued`` DB row, so only\n``running`` imports are stoppable: the flag is honoured at\n``import_window``'s next per-chunk checkpoint, finishing the row\nas ``stopped`` with partial counts preserved. Already-terminal /\nmissing → 409 / 404.",
        "operationId": "stop_import_events_connections_imports__import_id__stop_post",
        "parameters": [
          {
            "name": "import_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Import Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Stop Import Events Connections Imports  Import Id  Stop Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/connections/daily/": {
      "get": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "List Daily",
        "description": "Newest-first list of daily-coverage rows.\n\nOptional ``since`` / ``until`` are inclusive ``YYYY-MM-DD`` bounds\non the row's ``_id``. ``limit`` is clamped to 1000 by the storage\nlayer.\n\n``lite=true`` projects away the heavy ``scan_gaps`` list — useful\nfor the whole-year calendar fetch where only ``status`` + counts\nare rendered per cell. The full gap detail loads on demand when\nthe operator drills into a specific day via ``GET /daily/{date}/``.",
        "operationId": "list_daily_events_connections_daily__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "lite",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Lite"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Daily Events Connections Daily  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/connections/daily/{date}/": {
      "get": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Get Daily",
        "description": "Single daily-coverage row including the full ``scan_gaps`` list.\n\nReturns 404 when no row exists for the date — the calendar should\ntreat that as ``unverified`` and offer a ``POST /verify`` button.",
        "operationId": "get_daily_events_connections_daily__date___get",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Daily Events Connections Daily  Date   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/connections/daily/{date}/verify": {
      "post": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Verify Daily",
        "description": "Recompute coverage for one UTC day and upsert the daily row.\n\nNo RIPE call — reads only ``db.events_connections_imports`` and\n``db.events_connections``. Returns the freshly-written row.\n\nWrapped in ``asyncio.to_thread`` because the verify aggregation\nis synchronous Mongo; without the shim the FastAPI event loop\nwould stall briefly.",
        "operationId": "verify_daily_events_connections_daily__date__verify_post",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Verify Daily Events Connections Daily  Date  Verify Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/connections/daily/{date}/reprocess": {
      "post": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Reprocess Daily",
        "description": "Force a full re-fetch of one UTC day from RIPE.\n\nDistinct from ``/verify`` (which only recomputes coverage from\ndata already on file): this queues a backfill spanning the\nentire ``[day_start, day_start + 86_400)`` window regardless of\ncurrent coverage. The intended use is \"events for this day\narrived late at RIPE\" — a verify alone can't fix that because\nthe data was never imported; only a re-fetch can.\n\nFlow:\n  1. Mark the daily row ``queued`` + ``reprocess_pending`` so the\n     calendar reflects the request immediately.\n  2. Enqueue the full-day window on the events backfill worker.\n  3. When the worker's import completes, the end-of-run\n     re-verify hook recomputes coverage and — because\n     ``reprocess_pending`` is set — seals the day with\n     ``reprocessed_at`` once it hits 100%. After that the day is\n     done; no further reprocess is needed.\n\nReturns the queued daily row plus the worker snapshot.",
        "operationId": "reprocess_daily_events_connections_daily__date__reprocess_post",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Reprocess Daily Events Connections Daily  Date  Reprocess Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/connections/daily/verify-range": {
      "post": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Verify Daily Range",
        "description": "Re-verify every date in a window.\n\nNo RIPE call. Loops :meth:`EventsConnections.verify_day` across\nthe range; dates that error are recorded individually rather\nthan aborting the bulk run. Returns\n``{verified, errors, count, since, until}``.\n\nSynchronous on purpose — per-date verify is ~tens of ms, and the\n:attr:`EventsConnections.VERIFY_RANGE_MAX_DAYS` cap keeps the\nworst-case request inside the standard HTTP timeout. Operators\nwanting a wider rebuild chunk the submission.",
        "operationId": "verify_daily_range_events_connections_daily_verify_range_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api__routers__events_connections__VerifyDaysRangeSubmit"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Verify Daily Range Events Connections Daily Verify Range Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/connections/daily/{date}/recompute-stats": {
      "post": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Recompute Daily Stats",
        "description": "Re-derive the day's ``stats`` block from cached events.\n\nDB-only (no RIPE) — recomputes the distributions for the UTC-day\nevent cohort and rewrites ``stats`` / ``stats_recomputed_at`` on\nthe daily-coverage row in place. 400 when the day has no coverage\nrow yet (verify it first) or on a bad date.",
        "operationId": "recompute_daily_stats_events_connections_daily__date__recompute_stats_post",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Recompute Daily Stats Events Connections Daily  Date  Recompute Stats Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/connections/daily/recompute-stats-range": {
      "post": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Recompute Daily Stats Range",
        "description": "Bulk-rebuild the ``stats`` block across a date window.\n\nLoops :meth:`EventsConnections.recompute_day_stats`; days with no\ncoverage row are reported as ``skipped`` rather than aborting.\nDB-only, capped, wrapped in :func:`run_and_record`.",
        "operationId": "recompute_daily_stats_range_events_connections_daily_recompute_stats_range_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api__routers__events_connections__RecomputeStatsRangeSubmit"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Recompute Daily Stats Range Events Connections Daily Recompute Stats Range Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/connections/daily/stats-coverage": {
      "get": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Daily Stats Coverage",
        "description": "Per-class daily-stats coverage over the retained window.\n\nPure read — one indexed ``_id``-range scan, no recompute. Returns\nthe :meth:`EventsConnections.stats_coverage` blob\n(``schema_version`` + ``counts`` of\n``missing``/``stale_schema``/``stale_data``/``current`` +\n``stale_dates``). 400 on a bad / inverted range.",
        "operationId": "daily_stats_coverage_events_connections_daily_stats_coverage_get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "inclusive start, YYYY-MM-DD",
              "title": "Since"
            },
            "description": "inclusive start, YYYY-MM-DD"
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "inclusive end, YYYY-MM-DD",
              "title": "Until"
            },
            "description": "inclusive end, YYYY-MM-DD"
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Daily Stats Coverage Events Connections Daily Stats Coverage Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/connections/daily/backfill-stale-stats": {
      "post": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Backfill Stale Daily Stats",
        "description": "Force an immediate newest-first recompute of stale daily-stats.\n\nThe on-demand burst counterpart to the drain cron — use right\nafter a deliberate ``STATS_SCHEMA_VERSION`` bump to converge now\nrather than waiting for the cron to grind through. DB-only,\nidempotent, bounded (``max_days`` server-clamped). Wrapped in\n:func:`run_and_record` so it lands in ``db.task_history``.",
        "operationId": "backfill_stale_daily_stats_events_connections_daily_backfill_stale_stats_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/api__routers__events_connections__BackfillStaleStatsSubmit"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Backfill Stale Daily Stats Events Connections Daily Backfill Stale Stats Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/connections/backfill": {
      "post": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Submit Backfill",
        "description": "Queue a backfill job. Returns immediately; the worker walks\nthe queue serially. Range validation is done up front so a typo\ngets a 400 instead of disappearing into the worker.\n\nComposite-key dedup (``_id = \"<prb_id>:<timestamp>:<event[0]>\"``)\nmeans re-running over a range you already covered is safe — the\nupserts hit existing docs and become no-op writes.",
        "operationId": "submit_backfill_events_connections_backfill_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api__routers__events_connections__BackfillSubmit"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Submit Backfill Events Connections Backfill Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/connections/backfill/status": {
      "get": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Get Backfill Status",
        "description": "Worker queue snapshot + liveness. All three fields are best-\neffort; the dashboard polls this at 5s while a backfill is\nrunning.",
        "operationId": "get_backfill_status_events_connections_backfill_status_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Backfill Status Events Connections Backfill Status Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/connections/backfill/recover-stale": {
      "post": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Recover Stale Backfill",
        "description": "Re-enqueue any imports stuck in ``running`` state.\n\nThese rows are orphaned by a previous process: the worker that\nwrote them died (typically a backend restart) before flipping\nthem to ``success`` / ``failed``. Recovery marks each orphan\n``failed`` (with a \"worker died mid-import; re-enqueued\" note,\nso the import-history table reflects the death honestly) and\nre-enqueues the same ``(scan_start_ts, scan_stop_ts)`` window\nfor the live worker.\n\nThe same recovery runs automatically at worker startup; this\nendpoint covers the rarer follow-up case where the worker task\ndied mid-life but the backend kept running, leaving the queue\nstranded.\n\nSafe to call any time. :meth:`EventsConnections.import_window`\nis idempotent (composite-``_id`` upserts), so re-running over a\nrange the orphan already partly imported just lands the\nremainder.",
        "operationId": "recover_stale_backfill_events_connections_backfill_recover_stale_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Recover Stale Backfill Events Connections Backfill Recover Stale Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/uptimes/stats/": {
      "get": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Get Stats",
        "description": "Header tiles for the admin panel — total events, last 24h\ncount, latest event/stored timestamps, last successful import\nrow, plus the worker queue snapshot + liveness.",
        "operationId": "get_stats_events_uptimes_stats__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Stats Events Uptimes Stats  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/uptimes/imports/": {
      "get": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "List Imports",
        "description": "Newest-first list of import-run rows. ``since`` / ``until`` are\ninclusive ``YYYY-MM-DD`` bounds on ``started_at``; ``trigger``\nnarrows to a single class of run (scheduled / manual / backfill).",
        "operationId": "list_imports_events_uptimes_imports__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "trigger",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Trigger"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Imports Events Uptimes Imports  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/uptimes/imports/{import_id}/": {
      "get": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Get Import",
        "description": "Single import-run row including counts + error if any.\n``import_id`` is the ``<trigger>_<started_ts>`` we generated at\nsubmission time.",
        "operationId": "get_import_events_uptimes_imports__import_id___get",
        "parameters": [
          {
            "name": "import_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Import Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Import Events Uptimes Imports  Import Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/uptimes/imports/{import_id}/stop": {
      "post": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Stop Import",
        "description": "Stop a running import (cooperative).\n\nEvents-connections writes no ``queued`` DB row, so only\n``running`` imports are stoppable: the flag is honoured at\n``import_window``'s next per-chunk checkpoint, finishing the row\nas ``stopped`` with partial counts preserved. Already-terminal /\nmissing → 409 / 404.",
        "operationId": "stop_import_events_uptimes_imports__import_id__stop_post",
        "parameters": [
          {
            "name": "import_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Import Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Stop Import Events Uptimes Imports  Import Id  Stop Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/uptimes/daily/": {
      "get": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "List Daily",
        "description": "Newest-first list of daily-coverage rows.\n\nOptional ``since`` / ``until`` are inclusive ``YYYY-MM-DD`` bounds\non the row's ``_id``. ``limit`` is clamped to 1000 by the storage\nlayer.\n\n``lite=true`` projects away the heavy ``scan_gaps`` list — useful\nfor the whole-year calendar fetch where only ``status`` + counts\nare rendered per cell. The full gap detail loads on demand when\nthe operator drills into a specific day via ``GET /daily/{date}/``.",
        "operationId": "list_daily_events_uptimes_daily__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "lite",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Lite"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Daily Events Uptimes Daily  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/uptimes/daily/{date}/": {
      "get": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Get Daily",
        "description": "Single daily-coverage row including the full ``scan_gaps`` list.\n\nReturns 404 when no row exists for the date — the calendar should\ntreat that as ``unverified`` and offer a ``POST /verify`` button.",
        "operationId": "get_daily_events_uptimes_daily__date___get",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Daily Events Uptimes Daily  Date   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/uptimes/daily/{date}/verify": {
      "post": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Verify Daily",
        "description": "Recompute coverage for one UTC day and upsert the daily row.\n\nNo RIPE call — reads only ``db.events_uptimes_imports`` and\n``db.events_uptimes``. Returns the freshly-written row.\n\nWrapped in ``asyncio.to_thread`` because the verify aggregation\nis synchronous Mongo; without the shim the FastAPI event loop\nwould stall briefly.",
        "operationId": "verify_daily_events_uptimes_daily__date__verify_post",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Verify Daily Events Uptimes Daily  Date  Verify Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/uptimes/daily/{date}/reprocess": {
      "post": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Reprocess Daily",
        "description": "Force a full re-fetch of one UTC day from RIPE.\n\nDistinct from ``/verify`` (which only recomputes coverage from\ndata already on file): this queues a backfill spanning the\nentire ``[day_start, day_start + 86_400)`` window regardless of\ncurrent coverage. The intended use is \"events for this day\narrived late at RIPE\" — a verify alone can't fix that because\nthe data was never imported; only a re-fetch can.\n\nFlow:\n  1. Mark the daily row ``queued`` + ``reprocess_pending`` so the\n     calendar reflects the request immediately.\n  2. Enqueue the full-day window on the events backfill worker.\n  3. When the worker's import completes, the end-of-run\n     re-verify hook recomputes coverage and — because\n     ``reprocess_pending`` is set — seals the day with\n     ``reprocessed_at`` once it hits 100%. After that the day is\n     done; no further reprocess is needed.\n\nReturns the queued daily row plus the worker snapshot.",
        "operationId": "reprocess_daily_events_uptimes_daily__date__reprocess_post",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Reprocess Daily Events Uptimes Daily  Date  Reprocess Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/uptimes/daily/verify-range": {
      "post": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Verify Daily Range",
        "description": "Re-verify every date in a window.\n\nNo RIPE call. Loops :meth:`EventsUptimes.verify_day` across\nthe range; dates that error are recorded individually rather\nthan aborting the bulk run. Returns\n``{verified, errors, count, since, until}``.\n\nSynchronous on purpose — per-date verify is ~tens of ms, and the\n:attr:`EventsUptimes.VERIFY_RANGE_MAX_DAYS` cap keeps the\nworst-case request inside the standard HTTP timeout. Operators\nwanting a wider rebuild chunk the submission.",
        "operationId": "verify_daily_range_events_uptimes_daily_verify_range_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api__routers__events_uptimes__VerifyDaysRangeSubmit"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Verify Daily Range Events Uptimes Daily Verify Range Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/uptimes/daily/{date}/recompute-stats": {
      "post": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Recompute Daily Stats",
        "description": "Re-derive the day's ``stats`` block from cached events.\n\nDB-only (no RIPE) — recomputes the distributions for the UTC-day\nevent cohort and rewrites ``stats`` / ``stats_recomputed_at`` on\nthe daily-coverage row in place. 400 when the day has no coverage\nrow yet (verify it first) or on a bad date.",
        "operationId": "recompute_daily_stats_events_uptimes_daily__date__recompute_stats_post",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Recompute Daily Stats Events Uptimes Daily  Date  Recompute Stats Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/uptimes/daily/recompute-stats-range": {
      "post": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Recompute Daily Stats Range",
        "description": "Bulk-rebuild the ``stats`` block across a date window.\n\nLoops :meth:`EventsUptimes.recompute_day_stats`; days with no\ncoverage row are reported as ``skipped`` rather than aborting.\nDB-only, capped, wrapped in :func:`run_and_record`.",
        "operationId": "recompute_daily_stats_range_events_uptimes_daily_recompute_stats_range_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api__routers__events_uptimes__RecomputeStatsRangeSubmit"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Recompute Daily Stats Range Events Uptimes Daily Recompute Stats Range Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/uptimes/daily/stats-coverage": {
      "get": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Daily Stats Coverage",
        "description": "Per-class daily-stats coverage over the retained window.\n\nPure read — one indexed ``_id``-range scan, no recompute. Returns\nthe :meth:`EventsUptimes.stats_coverage` blob\n(``schema_version`` + ``counts`` of\n``missing``/``stale_schema``/``stale_data``/``current`` +\n``stale_dates``). 400 on a bad / inverted range.",
        "operationId": "daily_stats_coverage_events_uptimes_daily_stats_coverage_get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "inclusive start, YYYY-MM-DD",
              "title": "Since"
            },
            "description": "inclusive start, YYYY-MM-DD"
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "inclusive end, YYYY-MM-DD",
              "title": "Until"
            },
            "description": "inclusive end, YYYY-MM-DD"
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Daily Stats Coverage Events Uptimes Daily Stats Coverage Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/uptimes/daily/backfill-stale-stats": {
      "post": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Backfill Stale Daily Stats",
        "description": "Force an immediate newest-first recompute of stale daily-stats.\n\nThe on-demand burst counterpart to the drain cron — use right\nafter a deliberate ``STATS_SCHEMA_VERSION`` bump to converge now\nrather than waiting for the cron to grind through. DB-only,\nidempotent, bounded (``max_days`` server-clamped). Wrapped in\n:func:`run_and_record` so it lands in ``db.task_history``.",
        "operationId": "backfill_stale_daily_stats_events_uptimes_daily_backfill_stale_stats_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/api__routers__events_uptimes__BackfillStaleStatsSubmit"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Backfill Stale Daily Stats Events Uptimes Daily Backfill Stale Stats Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/uptimes/backfill": {
      "post": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Submit Backfill",
        "description": "Queue a backfill job. Returns immediately; the worker walks\nthe queue serially. Range validation is done up front so a typo\ngets a 400 instead of disappearing into the worker.\n\nComposite-key dedup (``_id = \"<prb_id>:<timestamp>:<event[0]>\"``)\nmeans re-running over a range you already covered is safe — the\nupserts hit existing docs and become no-op writes.",
        "operationId": "submit_backfill_events_uptimes_backfill_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api__routers__events_uptimes__BackfillSubmit"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Submit Backfill Events Uptimes Backfill Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/uptimes/backfill/status": {
      "get": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Get Backfill Status",
        "description": "Worker queue snapshot + liveness. All three fields are best-\neffort; the dashboard polls this at 5s while a backfill is\nrunning.",
        "operationId": "get_backfill_status_events_uptimes_backfill_status_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Backfill Status Events Uptimes Backfill Status Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/uptimes/backfill/stop-all": {
      "post": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Stop All Backfills",
        "description": "Hard-stop every uptime backfill.\n\nTwo moves: discard all queued-but-not-started jobs from this\nprocess's in-memory queue, then flip ``stop_requested`` on **every**\n``running`` import row (this process or any replica). Each in-flight\n``import_window`` finishes as ``stopped`` at its next per-chunk\ncheckpoint — partial counts preserved, no data loss (the ingest is\nidempotent). Returns the drop / signal tally + the worker snapshot.",
        "operationId": "stop_all_backfills_events_uptimes_backfill_stop_all_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Stop All Backfills Events Uptimes Backfill Stop All Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/uptimes/purge-resyncs": {
      "post": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Purge Bogus Resyncs",
        "description": "Start a background sweep of the bogus resync-only change-points\nleft by the old over-sensitive detector (any ``lts`` decrease →\nresync).\n\nDeletes only docs whose sole reason is ``resync`` and whose ``lts``\ndrop is within the sync-jitter slack — records the corrected\ndetector would never have written. Legitimate change-points (and\ngenuine large resyncs) are untouched.\n\nRuns **detached** — the collection can hold millions of rows, far\nmore than a single request's timeout allows — and returns the\ninitial status immediately. Poll ``GET /purge-resyncs/status`` for\nlive progress. 409 if a purge is already in flight.",
        "operationId": "purge_bogus_resyncs_events_uptimes_purge_resyncs_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/PurgeResyncsSubmit"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Purge Bogus Resyncs Events Uptimes Purge Resyncs Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/uptimes/purge-resyncs/status": {
      "get": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Purge Resyncs Status",
        "description": "Live snapshot of the background resync purge — counters while\nrunning, final tally (or error) once done.",
        "operationId": "purge_resyncs_status_events_uptimes_purge_resyncs_status_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Purge Resyncs Status Events Uptimes Purge Resyncs Status Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/events/uptimes/backfill/recover-stale": {
      "post": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Recover Stale Backfill",
        "description": "Re-enqueue any imports stuck in ``running`` state.\n\nThese rows are orphaned by a previous process: the worker that\nwrote them died (typically a backend restart) before flipping\nthem to ``success`` / ``failed``. Recovery marks each orphan\n``failed`` (with a \"worker died mid-import; re-enqueued\" note,\nso the import-history table reflects the death honestly) and\nre-enqueues the same ``(scan_start_ts, scan_stop_ts)`` window\nfor the live worker.\n\nThe same recovery runs automatically at worker startup; this\nendpoint covers the rarer follow-up case where the worker task\ndied mid-life but the backend kept running, leaving the queue\nstranded.\n\nSafe to call any time. :meth:`EventsUptimes.import_window`\nis idempotent (composite-``_id`` upserts), so re-running over a\nrange the orphan already partly imported just lands the\nremainder.",
        "operationId": "recover_stale_backfill_events_uptimes_backfill_recover_stale_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Recover Stale Backfill Events Uptimes Backfill Recover Stale Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/as-population/series/": {
      "get": {
        "tags": [
          "as-population",
          "mongo",
          "as-population",
          "mongo"
        ],
        "summary": "Get Series",
        "description": "Public daily-stats series for the trends view. No auth gate —\nsame posture as the measurements-meta / events-connections /\nprobe-archive series (aggregate counts over public APNIC info).\n400 on a bad / inverted / over-cap range.",
        "operationId": "get_series_as_population_series__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Until"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Series As Population Series  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/as-population/by-as/{asn}/": {
      "get": {
        "tags": [
          "as-population",
          "mongo"
        ],
        "summary": "Get For As",
        "description": "Per-AS estimated-user-population time series (oldest-first).\nLogged-in. ``since`` / ``until`` are inclusive ``YYYY-MM-DD``.",
        "operationId": "get_for_as_as_population_by_as__asn___get",
        "parameters": [
          {
            "name": "asn",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Asn"
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get For As As Population By As  Asn   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/as-population/stats/": {
      "get": {
        "tags": [
          "as-population",
          "mongo"
        ],
        "summary": "Get Stats",
        "description": "Header tiles + worker snapshot for the admin panel.",
        "operationId": "get_stats_as_population_stats__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Stats As Population Stats  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/as-population/imports/": {
      "get": {
        "tags": [
          "as-population",
          "mongo"
        ],
        "summary": "List Imports",
        "description": "Newest-first import-run rows. ``since`` / ``until`` are\ninclusive ``YYYY-MM-DD`` bounds on ``started_at``.",
        "operationId": "list_imports_as_population_imports__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "trigger",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Trigger"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Imports As Population Imports  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/as-population/imports/{import_id}/": {
      "get": {
        "tags": [
          "as-population",
          "mongo"
        ],
        "summary": "Get Import",
        "operationId": "get_import_as_population_imports__import_id___get",
        "parameters": [
          {
            "name": "import_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Import Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Import As Population Imports  Import Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/as-population/imports/{import_id}/stop": {
      "post": {
        "tags": [
          "as-population",
          "mongo"
        ],
        "summary": "Stop Import",
        "description": "Cooperative stop. Only ``running`` imports are stoppable\n(no pre-queued DB row). 404 / 409 otherwise.",
        "operationId": "stop_import_as_population_imports__import_id__stop_post",
        "parameters": [
          {
            "name": "import_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Import Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Stop Import As Population Imports  Import Id  Stop Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/as-population/daily/": {
      "get": {
        "tags": [
          "as-population",
          "mongo"
        ],
        "summary": "List Daily",
        "description": "Newest-first daily-coverage rows. ``lite=true`` drops the heavy\n``stats`` block — used for the whole-year calendar fetch.",
        "operationId": "list_daily_as_population_daily__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "lite",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Lite"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Daily As Population Daily  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/as-population/daily/stats-coverage": {
      "get": {
        "tags": [
          "as-population",
          "mongo"
        ],
        "summary": "Daily Stats Coverage",
        "description": "Per-class daily-stats coverage over the retained window. Pure\nread. 400 on a bad / inverted range.",
        "operationId": "daily_stats_coverage_as_population_daily_stats_coverage_get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "inclusive start, YYYY-MM-DD",
              "title": "Since"
            },
            "description": "inclusive start, YYYY-MM-DD"
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "inclusive end, YYYY-MM-DD",
              "title": "Until"
            },
            "description": "inclusive end, YYYY-MM-DD"
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Daily Stats Coverage As Population Daily Stats Coverage Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/as-population/daily/verify-range": {
      "post": {
        "tags": [
          "as-population",
          "mongo"
        ],
        "summary": "Verify Daily Range",
        "description": "Re-verify every date in a window. No APNIC call. Per-date\nerrors are recorded, not raised.",
        "operationId": "verify_daily_range_as_population_daily_verify_range_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DateRangeSubmit"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Verify Daily Range As Population Daily Verify Range Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/as-population/daily/recompute-stats-range": {
      "post": {
        "tags": [
          "as-population",
          "mongo"
        ],
        "summary": "Recompute Daily Stats Range",
        "description": "Bulk-rebuild the ``stats`` block across a window. DB-only,\ncapped, audited via ``run_and_record``.",
        "operationId": "recompute_daily_stats_range_as_population_daily_recompute_stats_range_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DateRangeSubmit"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Recompute Daily Stats Range As Population Daily Recompute Stats Range Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/as-population/daily/backfill-stale-stats": {
      "post": {
        "tags": [
          "as-population",
          "mongo"
        ],
        "summary": "Backfill Stale Daily Stats",
        "description": "Force an immediate newest-first recompute of stale daily-stats.\nDB-only, idempotent, bounded. Audited.",
        "operationId": "backfill_stale_daily_stats_as_population_daily_backfill_stale_stats_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/api__routers__as_population__BackfillStaleStatsSubmit"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Backfill Stale Daily Stats As Population Daily Backfill Stale Stats Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/as-population/daily/{date}/": {
      "get": {
        "tags": [
          "as-population",
          "mongo"
        ],
        "summary": "Get Daily",
        "operationId": "get_daily_as_population_daily__date___get",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Daily As Population Daily  Date   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/as-population/daily/{date}/verify": {
      "post": {
        "tags": [
          "as-population",
          "mongo"
        ],
        "summary": "Verify Daily",
        "description": "Recompute one day's coverage + stats from cached rows. No\nAPNIC call. 400 on a bad date.",
        "operationId": "verify_daily_as_population_daily__date__verify_post",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Verify Daily As Population Daily  Date  Verify Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/as-population/daily/{date}/reprocess": {
      "post": {
        "tags": [
          "as-population",
          "mongo"
        ],
        "summary": "Reprocess Daily",
        "description": "Force a re-fetch of one date's snapshot from APNIC.\n\nMarks the day ``queued`` + ``reprocess_pending`` (calendar\nreflects it immediately), then enqueues a single-date backfill.\nThe worker's import re-verifies and — because\n``reprocess_pending`` is set — seals the day once it lands\n``success``. NB: APNIC may substitute the nearest snapshot if it\nholds no exact history; that resolves to ``substituted``, not a\nsilent mislabel.",
        "operationId": "reprocess_daily_as_population_daily__date__reprocess_post",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Reprocess Daily As Population Daily  Date  Reprocess Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/as-population/daily/{date}/recompute-stats": {
      "post": {
        "tags": [
          "as-population",
          "mongo"
        ],
        "summary": "Recompute Daily Stats",
        "description": "Re-derive one day's ``stats`` block from cached rows. DB-only.\n400 when the day has no coverage row yet (verify first).",
        "operationId": "recompute_daily_stats_as_population_daily__date__recompute_stats_post",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Recompute Daily Stats As Population Daily  Date  Recompute Stats Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/as-population/backfill": {
      "post": {
        "tags": [
          "as-population",
          "mongo"
        ],
        "summary": "Submit Backfill",
        "description": "Queue a historical date-range backfill (one APNIC fetch per\ndate). Returns immediately; the worker walks the queue serially.\nEach touched day is pre-lit ``queued`` so the calendar reflects\nthe enqueue. Idempotent (composite ``_id`` upserts).",
        "operationId": "submit_backfill_as_population_backfill_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DateRangeSubmit"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Submit Backfill As Population Backfill Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/as-population/backfill/status": {
      "get": {
        "tags": [
          "as-population",
          "mongo"
        ],
        "summary": "Get Backfill Status",
        "description": "Worker queue snapshot + liveness. Dashboard polls this at 5s\nwhile a backfill is running.",
        "operationId": "get_backfill_status_as_population_backfill_status_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Backfill Status As Population Backfill Status Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/as-population/backfill/recover-stale": {
      "post": {
        "tags": [
          "as-population",
          "mongo"
        ],
        "summary": "Recover Stale Backfill",
        "description": "Re-enqueue imports orphaned in ``running`` by a dead worker.\nMarks each ``failed`` (audit-honest) then re-enqueues its date.\nSafe to call any time (idempotent imports).",
        "operationId": "recover_stale_backfill_as_population_backfill_recover_stale_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Recover Stale Backfill As Population Backfill Recover Stale Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/as-population/gaps/": {
      "get": {
        "tags": [
          "as-population",
          "mongo"
        ],
        "summary": "List Gaps",
        "description": "Per-ASN deployment-gap rows for the dashboard's main table.",
        "operationId": "list_gaps_as_population_gaps__get",
        "parameters": [
          {
            "name": "max_probes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 3,
              "title": "Max Probes"
            }
          },
          {
            "name": "min_population",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10000,
              "title": "Min Population"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "statuses",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Statuses"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "population_desc",
                "probe_count_asc",
                "gap_score_desc"
              ],
              "type": "string",
              "description": "population_desc = biggest user populations first (default); probe_count_asc = least-covered first; gap_score_desc = users × deficit",
              "default": "population_desc",
              "title": "Sort"
            },
            "description": "population_desc = biggest user populations first (default); probe_count_asc = least-covered first; gap_score_desc = users × deficit"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 200,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Gaps As Population Gaps  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/as-population/gaps/by-country/": {
      "get": {
        "tags": [
          "as-population",
          "mongo"
        ],
        "summary": "List Gaps By Country",
        "description": "Per-country rollup for the gap dashboard's \"By country\" tab.",
        "operationId": "list_gaps_by_country_as_population_gaps_by_country__get",
        "parameters": [
          {
            "name": "max_probes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 3,
              "title": "Max Probes"
            }
          },
          {
            "name": "min_population",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10000,
              "title": "Min Population"
            }
          },
          {
            "name": "statuses",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Statuses"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "users_desc",
                "gap_count_desc",
                "country_asc"
              ],
              "type": "string",
              "description": "users_desc = most uncovered users first (default); gap_count_desc = most gap ASNs first; country_asc = alphabetical",
              "default": "users_desc",
              "title": "Sort"
            },
            "description": "users_desc = most uncovered users first (default); gap_count_desc = most gap ASNs first; country_asc = alphabetical"
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Gaps By Country As Population Gaps By Country  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/as-population/gaps/countries/": {
      "get": {
        "tags": [
          "as-population",
          "mongo"
        ],
        "summary": "List Gap Countries",
        "description": "Distinct ISO ``cc`` values present in the latest snapshot —\ndrives the country-filter dropdown.",
        "operationId": "list_gap_countries_as_population_gaps_countries__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Gap Countries As Population Gaps Countries  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/country-coverage/": {
      "get": {
        "tags": [
          "deployments",
          "mongo"
        ],
        "summary": "Get Country Coverage",
        "description": "Whole-fleet per-country coverage snapshot: headline tiles, the\nper-country rows, and the coverage-gap / fragile lists. Computed\nlive from ``db.probes`` + ``db.countries`` + ``db.as_population``.\n\nDrives the page's autocomplete + fleet-overview landing state; the\nper-country detail lives at ``GET /country-coverage/{cc}``.",
        "operationId": "get_country_coverage_country_coverage__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Country Coverage Country Coverage  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/country-coverage/changes": {
      "get": {
        "tags": [
          "deployments",
          "mongo"
        ],
        "summary": "Get Country Changes",
        "description": "Coverage transitions plus the standing counts, for the dashboard.\n\nLogged-in rather than staff-gated: this is a read-only summary of\npublic fleet facts, and the dashboard it feeds is available to any\nsigned-in user.\n\nBoth counts come from the snapshot the hourly detection pass writes,\nnot from :class:`CountryCoverage` — that scans every probe with a\nwide projection, which is far too heavy for a surface loaded on\nevery sign-in.",
        "operationId": "get_country_changes_country_coverage_changes_get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Country Changes Country Coverage Changes Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/country-coverage/{cc}": {
      "get": {
        "tags": [
          "deployments",
          "mongo"
        ],
        "summary": "Get Country Detail",
        "description": "Single-country deployment detail: status / IPv4-IPv6 readiness /\nAS diversity / recent churn / density + the gap-fragile assessment.\n404 when ``cc`` is unknown (no probes and not a known country).",
        "operationId": "get_country_detail_country_coverage__cc__get",
        "parameters": [
          {
            "name": "cc",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cc"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Country Detail Country Coverage  Cc  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/feedback/": {
      "post": {
        "tags": [
          "feedback",
          "mongo"
        ],
        "summary": "Submit Feedback",
        "description": "Submit feedback. Anonymous is allowed but one-way (stored +\nshown to admins, no reply path). Logged-in starts a two-way\nthread. Rate-limited per username / client IP.",
        "operationId": "submit_feedback_feedback__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Submit Feedback Feedback  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/feedback/unread-count/": {
      "get": {
        "tags": [
          "feedback",
          "mongo"
        ],
        "summary": "Feedback Unread Count",
        "description": "``{count}`` of the caller's threads with an unread admin reply\n— the feedback-button badge poll. ``0`` when anonymous (no\nthreads).",
        "operationId": "feedback_unread_count_feedback_unread_count__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Feedback Unread Count Feedback Unread Count  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/feedback/mine/": {
      "get": {
        "tags": [
          "feedback",
          "mongo"
        ],
        "summary": "List My Feedback",
        "description": "The caller's own threads, newest-activity first.",
        "operationId": "list_my_feedback_feedback_mine__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List My Feedback Feedback Mine  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/feedback/mine/{thread_id}/": {
      "get": {
        "tags": [
          "feedback",
          "mongo"
        ],
        "summary": "Get My Thread",
        "description": "One of the caller's threads (marks it user-read). 404 when it\nisn't theirs / doesn't exist.",
        "operationId": "get_my_thread_feedback_mine__thread_id___get",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Thread Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get My Thread Feedback Mine  Thread Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/feedback/mine/{thread_id}/reply": {
      "post": {
        "tags": [
          "feedback",
          "mongo"
        ],
        "summary": "Reply To My Thread",
        "operationId": "reply_to_my_thread_feedback_mine__thread_id__reply_post",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Thread Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplyBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Reply To My Thread Feedback Mine  Thread Id  Reply Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/feedback/mine/{thread_id}/read": {
      "post": {
        "tags": [
          "feedback",
          "mongo"
        ],
        "summary": "Mark My Thread Read",
        "operationId": "mark_my_thread_read_feedback_mine__thread_id__read_post",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Thread Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Mark My Thread Read Feedback Mine  Thread Id  Read Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/feedback/": {
      "get": {
        "tags": [
          "feedback",
          "mongo"
        ],
        "summary": "Admin List Feedback",
        "operationId": "admin_list_feedback_admin_feedback__get",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "unread_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Unread Only"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response Admin List Feedback Admin Feedback  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/feedback/stats/": {
      "get": {
        "tags": [
          "feedback",
          "mongo"
        ],
        "summary": "Admin Feedback Stats",
        "description": "``{by_status, total, admin_unread}`` — admin-nav badge +\npanel header. Declared before ``/admin/feedback/{thread_id}/`` so\n``stats`` isn't captured as a thread id.",
        "operationId": "admin_feedback_stats_admin_feedback_stats__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Feedback Stats Admin Feedback Stats  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/feedback/{thread_id}/": {
      "get": {
        "tags": [
          "feedback",
          "mongo"
        ],
        "summary": "Admin Get Thread",
        "description": "Full thread (marks it admin-read).",
        "operationId": "admin_get_thread_admin_feedback__thread_id___get",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Thread Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Get Thread Admin Feedback  Thread Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/feedback/{thread_id}/reply": {
      "post": {
        "tags": [
          "feedback",
          "mongo"
        ],
        "summary": "Admin Reply Thread",
        "description": "Reply as admin (→ status ``answered``). 400 on an anonymous\nthread (no reply path) or a missing one.",
        "operationId": "admin_reply_thread_admin_feedback__thread_id__reply_post",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Thread Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplyBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Reply Thread Admin Feedback  Thread Id  Reply Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/feedback/{thread_id}/status": {
      "post": {
        "tags": [
          "feedback",
          "mongo"
        ],
        "summary": "Admin Set Status",
        "operationId": "admin_set_status_admin_feedback__thread_id__status_post",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Thread Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Set Status Admin Feedback  Thread Id  Status Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/flags/": {
      "get": {
        "tags": [
          "flags",
          "mongo"
        ],
        "summary": "List Flags",
        "description": "Management-view list. All filters optional; privacy filter\nalways applied (admins see everything else; non-admins see public\n+ their own private).",
        "operationId": "list_flags_flags__get",
        "parameters": [
          {
            "name": "collection",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Collection"
            }
          },
          {
            "name": "doc_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Doc Id"
            }
          },
          {
            "name": "author",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Author"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Type"
            }
          },
          {
            "name": "priority",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Priority"
            }
          },
          {
            "name": "done",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Done"
            }
          },
          {
            "name": "since_ts",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since Ts"
            }
          },
          {
            "name": "until_ts",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until Ts"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 200,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Flags Flags  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "flags",
          "mongo"
        ],
        "summary": "Create Flag",
        "description": "Authenticated. Validates the target row exists in its collection\nso a typo can't create an orphan flag.",
        "operationId": "create_flag_flags__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FlagCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Create Flag Flags  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/flags/for-target/": {
      "get": {
        "tags": [
          "flags",
          "mongo"
        ],
        "summary": "List For Target",
        "description": "Per-target list, newest-first. Same privacy filter as the\nmanagement view; convenience route so embedded ``<FlagList>``\ncomponents don't need to repeat the management endpoint's full\nparameter set.",
        "operationId": "list_for_target_flags_for_target__get",
        "parameters": [
          {
            "name": "collection",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Collection"
            }
          },
          {
            "name": "doc_id",
            "in": "query",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ],
              "title": "Doc Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List For Target Flags For Target  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/flags/counts/": {
      "post": {
        "tags": [
          "flags",
          "mongo"
        ],
        "summary": "Counts For Targets",
        "description": "Batched ``{<collection>:<doc_id>: {open, done}}`` counter map\nfor the per-target badge component. Privacy-filtered.",
        "operationId": "counts_for_targets_flags_counts__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api__routers__flags__CountsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "integer"
                    }
                  },
                  "title": "Response Counts For Targets Flags Counts  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/flags/{flag_id}/": {
      "get": {
        "tags": [
          "flags",
          "mongo"
        ],
        "summary": "Get Flag",
        "operationId": "get_flag_flags__flag_id___get",
        "parameters": [
          {
            "name": "flag_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Flag Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Flag Flags  Flag Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "flags",
          "mongo"
        ],
        "summary": "Update Flag",
        "description": "Author OR admin. Patches any subset of ``type`` / ``priority`` /\n``notes`` / ``due_date`` / ``private``. Pass ``due_date: null``\nexplicitly to clear it; omit the key to leave it unchanged.",
        "operationId": "update_flag_flags__flag_id___patch",
        "parameters": [
          {
            "name": "flag_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Flag Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FlagUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Update Flag Flags  Flag Id   Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "flags",
          "mongo"
        ],
        "summary": "Delete Flag",
        "description": "Author OR admin. Hard-delete; no tombstone.",
        "operationId": "delete_flag_flags__flag_id___delete",
        "parameters": [
          {
            "name": "flag_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Flag Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Delete Flag Flags  Flag Id   Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/flags/{flag_id}/done": {
      "post": {
        "tags": [
          "flags",
          "mongo"
        ],
        "summary": "Set Done",
        "description": "Mark done / undone. Author OR admin. Body: ``{done: true|false}``.\n\nRecords ``done_at`` / ``done_at_ts`` / ``done_by`` (the username\nthat flipped the toggle, distinct from the original author) when\ngoing to done; nulls them on the way back.",
        "operationId": "set_done_flags__flag_id__done_post",
        "parameters": [
          {
            "name": "flag_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Flag Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FlagDoneToggle"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Set Done Flags  Flag Id  Done Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/geonames/datasets/": {
      "get": {
        "tags": [
          "geonames",
          "mongo"
        ],
        "summary": "List Datasets",
        "description": "Catalogue of importable datasets — drives the admin dropdown.\n\nStatic today (the four GeoNames cities files); kept on the wire\nsurface so a future addition (e.g. allCountries, per-country) is\na backend-only change.",
        "operationId": "list_datasets_geonames_datasets__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Datasets Geonames Datasets  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/geonames/status/": {
      "get": {
        "tags": [
          "geonames",
          "mongo"
        ],
        "summary": "Get Status",
        "description": "High-level admin-header state — current dataset, total cities,\nlast import timestamp, plus the worker's in-flight dataset and\nqueue depth so the UI can render a \"Importing cities5000…\" chip\nwithout polling the import history.",
        "operationId": "get_status_geonames_status__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Status Geonames Status  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/geonames/stats/": {
      "get": {
        "tags": [
          "geonames",
          "mongo"
        ],
        "summary": "Get Stats",
        "description": "Live aggregation against the cities collection. Hundreds of\nms even for cities500.",
        "operationId": "get_stats_geonames_stats__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Stats Geonames Stats  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/geonames/imports/": {
      "get": {
        "tags": [
          "geonames",
          "mongo"
        ],
        "summary": "List Imports",
        "description": "Newest-first list of import-run rows. ``since`` / ``until`` are\ninclusive ``YYYY-MM-DD`` bounds on ``started_at``. Limit clamped\nto 1000 by the storage layer.",
        "operationId": "list_imports_geonames_imports__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Imports Geonames Imports  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/geonames/imports/{import_id}/": {
      "get": {
        "tags": [
          "geonames",
          "mongo"
        ],
        "summary": "Get Import",
        "description": "Single import-run row including the full stats block when\npresent. ``import_id`` is the ``<dataset>_<started_ts>`` we\ngenerated at submission time.",
        "operationId": "get_import_geonames_imports__import_id___get",
        "parameters": [
          {
            "name": "import_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Import Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Import Geonames Imports  Import Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/geonames/imports/run": {
      "post": {
        "tags": [
          "geonames",
          "mongo"
        ],
        "summary": "Submit Import",
        "description": "Queue an import job. Returns immediately with a placeholder\naudit row; the worker picks it up serially.\n\nValidates the dataset name up front so a typo gets a 400 instead\nof disappearing into the worker. The actual ``running`` audit\nrow is written by ``Geonames.import_dataset`` once the worker\nreaches it — until then ``GET /imports/`` won't show this\nsubmission.",
        "operationId": "submit_import_geonames_imports_run_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api__routers__geonames__ImportSubmit"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Submit Import Geonames Imports Run Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/geonames/{geonameid}/changes/": {
      "get": {
        "tags": [
          "geonames",
          "mongo"
        ],
        "summary": "List Changes",
        "description": "Per-record change history for one city (newest-first).\n\nPopulated by the import's diff (anchors/unlocode style): one row\nper import where the city's place fields materially changed.\nDeclared after the literal routes so ``int`` ``{geonameid}``\ncan't shadow ``/imports/`` etc. Admin-gated like the rest of this\npanel.",
        "operationId": "list_changes_geonames__geonameid__changes__get",
        "parameters": [
          {
            "name": "geonameid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Geonameid"
            }
          },
          {
            "name": "since_ts",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since Ts"
            }
          },
          {
            "name": "until_ts",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until Ts"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Changes Geonames  Geonameid  Changes  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/peeringdb/endpoints/": {
      "get": {
        "tags": [
          "peeringdb",
          "mongo"
        ],
        "summary": "List Endpoints",
        "description": "Catalogue of importable endpoints — drives the admin dropdown.\nStatic (14 endpoints baked into the substrate); kept on the wire\nsurface so future endpoint additions are a backend-only change.",
        "operationId": "list_endpoints_peeringdb_endpoints__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Endpoints Peeringdb Endpoints  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/peeringdb/status/": {
      "get": {
        "tags": [
          "peeringdb",
          "mongo"
        ],
        "summary": "Get Status",
        "description": "High-level admin-header state — per-endpoint row counts +\nlast import timestamp + worker liveness.",
        "operationId": "get_status_peeringdb_status__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Status Peeringdb Status  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/peeringdb/stats/{endpoint}/": {
      "get": {
        "tags": [
          "peeringdb",
          "mongo"
        ],
        "summary": "Get Endpoint Stats",
        "description": "Per-endpoint distribution stats (top-N buckets on\noperator-useful fields). 400 on unknown endpoint.",
        "operationId": "get_endpoint_stats_peeringdb_stats__endpoint___get",
        "parameters": [
          {
            "name": "endpoint",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Endpoint"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Endpoint Stats Peeringdb Stats  Endpoint   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/peeringdb/imports/": {
      "get": {
        "tags": [
          "peeringdb",
          "mongo"
        ],
        "summary": "List Imports",
        "description": "Newest-first list of import-run rows. Inclusive ``YYYY-MM-DD``\nbounds; ``endpoint`` filters to one endpoint.",
        "operationId": "list_imports_peeringdb_imports__get",
        "parameters": [
          {
            "name": "endpoint",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Endpoint"
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Imports Peeringdb Imports  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/peeringdb/imports/{import_id}/": {
      "get": {
        "tags": [
          "peeringdb",
          "mongo"
        ],
        "summary": "Get Import",
        "description": "Single import-run row. ``import_id`` is the\n``<endpoint>_<started_ts>`` we generated at submission time.",
        "operationId": "get_import_peeringdb_imports__import_id___get",
        "parameters": [
          {
            "name": "import_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Import Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Import Peeringdb Imports  Import Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/peeringdb/ix/": {
      "get": {
        "tags": [
          "peeringdb",
          "mongo"
        ],
        "summary": "Browse Ixps",
        "description": "List IXPs with optional ``q`` (name prefix), ``country`` (2-cc),\n``region`` (continent group). Server-paginates via ``limit`` +\n``skip``; envelope is ``{rows, total, limit, offset}``.",
        "operationId": "browse_ixps_peeringdb_ix__get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Region"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Browse Ixps Peeringdb Ix  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/peeringdb/ix/countries/": {
      "get": {
        "tags": [
          "peeringdb",
          "mongo"
        ],
        "summary": "List Ix Countries",
        "description": "Countries with IXPs — drives the picker on the IXP list view.",
        "operationId": "list_ix_countries_peeringdb_ix_countries__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Ix Countries Peeringdb Ix Countries  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/peeringdb/ix/regions/": {
      "get": {
        "tags": [
          "peeringdb",
          "mongo"
        ],
        "summary": "List Ix Regions",
        "description": "Continent-region groupings (PeeringDB's\n``data.region_continent``) — drives the region picker.",
        "operationId": "list_ix_regions_peeringdb_ix_regions__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Ix Regions Peeringdb Ix Regions  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/peeringdb/ix/{ix_id}/": {
      "get": {
        "tags": [
          "peeringdb",
          "mongo"
        ],
        "summary": "Get Ixp",
        "description": "One IXP joined with its LAN segments, prefixes, member\nnetworks (with ASN + peer IPs), and connected facilities.",
        "operationId": "get_ixp_peeringdb_ix__ix_id___get",
        "parameters": [
          {
            "name": "ix_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Ix Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Ixp Peeringdb Ix  Ix Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/peeringdb/net/": {
      "get": {
        "tags": [
          "peeringdb",
          "mongo"
        ],
        "summary": "Browse Networks",
        "description": "List networks (PeeringDB's view of ASNs). Filter by name\nprefix / exact ASN / org country.",
        "operationId": "browse_networks_peeringdb_net__get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "name": "asn",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Asn"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Browse Networks Peeringdb Net  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/peeringdb/net/countries/": {
      "get": {
        "tags": [
          "peeringdb",
          "mongo"
        ],
        "summary": "List Net Countries",
        "description": "Org countries (the net rows don't carry country directly;\nwe read from the parent org).",
        "operationId": "list_net_countries_peeringdb_net_countries__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Net Countries Peeringdb Net Countries  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/peeringdb/net/{asn}/": {
      "get": {
        "tags": [
          "peeringdb",
          "mongo"
        ],
        "summary": "Get Network",
        "description": "Network detail keyed by ASN (operator-friendly key).\nJoined with org + IXP participations + facility presences.",
        "operationId": "get_network_peeringdb_net__asn___get",
        "parameters": [
          {
            "name": "asn",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Asn"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Network Peeringdb Net  Asn   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/peeringdb/fac/": {
      "get": {
        "tags": [
          "peeringdb",
          "mongo"
        ],
        "summary": "Browse Facilities",
        "description": "List facilities (data centers / colo sites). Same filters\nas :func:`browse_ixps`.",
        "operationId": "browse_facilities_peeringdb_fac__get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Region"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Browse Facilities Peeringdb Fac  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/peeringdb/fac/countries/": {
      "get": {
        "tags": [
          "peeringdb",
          "mongo"
        ],
        "summary": "List Fac Countries",
        "operationId": "list_fac_countries_peeringdb_fac_countries__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Fac Countries Peeringdb Fac Countries  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/peeringdb/fac/regions/": {
      "get": {
        "tags": [
          "peeringdb",
          "mongo"
        ],
        "summary": "List Fac Regions",
        "operationId": "list_fac_regions_peeringdb_fac_regions__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Fac Regions Peeringdb Fac Regions  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/peeringdb/fac/{fac_id}/": {
      "get": {
        "tags": [
          "peeringdb",
          "mongo"
        ],
        "summary": "Get Facility",
        "description": "Facility detail joined with networks present + IXPs present.",
        "operationId": "get_facility_peeringdb_fac__fac_id___get",
        "parameters": [
          {
            "name": "fac_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Fac Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Facility Peeringdb Fac  Fac Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/peeringdb/imports/run": {
      "post": {
        "tags": [
          "peeringdb",
          "mongo"
        ],
        "summary": "Submit Import",
        "description": "Queue an import. Returns immediately with queue depth + the\nworker's in-flight job; the audit row is written once the worker\nreaches it (same contract as GeoNames).",
        "operationId": "submit_import_peeringdb_imports_run_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api__routers__peeringdb__ImportSubmit"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Submit Import Peeringdb Imports Run Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/peeringdb/resolve-geonames": {
      "post": {
        "tags": [
          "peeringdb",
          "mongo"
        ],
        "summary": "Resolve Geonames",
        "description": "Queue a GeoNames-resolution sweep. Returns immediately with\nthe worker's queue depth + the live progress snapshot — the\nactual work runs on the PeeringDB worker thread, which lets the\nUI poll :func:`get_resolve_geonames_status` and avoids the\nreverse-proxy 504 the synchronous version was hitting on the\nfull ~36 k-row sweep.\n\nAlready runs automatically after every successful\n``POST /imports/run`` with ``all=true``; this manual trigger is\nfor the case where GeoNames itself was just re-imported and any\npreviously-unresolved rows might now find a match.",
        "operationId": "resolve_geonames_peeringdb_resolve_geonames_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Resolve Geonames Peeringdb Resolve Geonames Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/peeringdb/resolve-geonames/status": {
      "get": {
        "tags": [
          "peeringdb",
          "mongo"
        ],
        "summary": "Get Resolve Geonames Status",
        "description": "Live snapshot of the current (or last-finished)\nGeoNames-resolve run. The UI polls this every couple of seconds\nwhile a run is in flight to drive the per-endpoint progress\nbars; once ``status`` flips to ``\"done\"`` or ``\"failed\"`` the\npoll can stop.\n\nReturns ``{state: None, ...}`` when no run has been triggered\nthis process-lifetime — the UI renders the trigger button in\nthat case, no progress surface.",
        "operationId": "get_resolve_geonames_status_peeringdb_resolve_geonames_status_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Resolve Geonames Status Peeringdb Resolve Geonames Status Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anycast/stats/": {
      "get": {
        "tags": [
          "anycast",
          "mongo"
        ],
        "summary": "Get Stats",
        "description": "High-level tiles: total v4 / v6 counts + latest import summary.",
        "operationId": "get_stats_anycast_stats__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Get Stats Anycast Stats  Get"
                }
              }
            }
          }
        }
      }
    },
    "/anycast/prefixes/": {
      "get": {
        "tags": [
          "anycast",
          "mongo"
        ],
        "summary": "List Prefixes",
        "description": "Paginated prefix browser. Filters compose with ``$and`` —\npick any subset.\n\n* ``af``      — 4 or 6 (only these two values are accepted;\n                anything else is treated as \"no filter\").\n* ``asn``     — exact match on the origin ASN (integer).\n* ``country`` — prefix observed in this country at any of its\n                catchments. ISO 3166-1 alpha-2.\n* ``q``       — substring match on the CIDR string (e.g. ``1.0.``).",
        "operationId": "list_prefixes_anycast_prefixes__get",
        "parameters": [
          {
            "name": "af",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Af"
            }
          },
          {
            "name": "asn",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Asn"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Skip"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Prefixes Anycast Prefixes  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anycast/prefixes/{prefix}": {
      "get": {
        "tags": [
          "anycast",
          "mongo"
        ],
        "summary": "Get Prefix",
        "description": "Single-prefix detail. Returns the full doc (incl. catchment\nlist) for the map view. 404 when the prefix isn't in the current\nanycast set — operators use that to confirm a prefix dropped out\nof the upstream feed.",
        "operationId": "get_prefix_anycast_prefixes__prefix__get",
        "parameters": [
          {
            "name": "prefix",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Prefix"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Prefix Anycast Prefixes  Prefix  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anycast/lookup/{ip}": {
      "get": {
        "tags": [
          "anycast",
          "mongo"
        ],
        "summary": "Lookup Ip",
        "description": "Longest-prefix-match for one IP. Returns the full anycast doc\n(prefix + ASN + catchments) or 404 when no anycast prefix covers\nit. Drives the \"is this IP anycast?\" check from monitoring and\nthe IP-detail page.",
        "operationId": "lookup_ip_anycast_lookup__ip__get",
        "parameters": [
          {
            "name": "ip",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Ip"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Lookup Ip Anycast Lookup  Ip  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anycast/intel/": {
      "get": {
        "tags": [
          "anycast",
          "mongo"
        ],
        "summary": "Get Intel",
        "description": "One-call Anycast Intelligence payload: headline stats, top origin\nASes (name-enriched), top countries, and the per-import growth/churn\nseries. Public read like the rest of this router.",
        "operationId": "get_intel_anycast_intel__get",
        "parameters": [
          {
            "name": "asn_limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 20,
              "title": "Asn Limit"
            }
          },
          {
            "name": "country_limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 50,
              "title": "Country Limit"
            }
          },
          {
            "name": "growth_limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 52,
              "title": "Growth Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Intel Anycast Intel  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anycast/changes/": {
      "get": {
        "tags": [
          "anycast",
          "mongo"
        ],
        "summary": "List Changes",
        "description": "Newest-first per-prefix change log. Each row is one add/remove\nevent from one import. ``since_ts`` filters to events at or after\na unix-second timestamp — pair with the dashboard's date range\nfor \"what's changed since N days ago\".",
        "operationId": "list_changes_anycast_changes__get",
        "parameters": [
          {
            "name": "action",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter to \"added\" or \"removed\". Omit for both.",
              "title": "Action"
            },
            "description": "Filter to \"added\" or \"removed\". Omit for both."
          },
          {
            "name": "since_ts",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since Ts"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 200,
              "title": "Limit"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Skip"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Changes Anycast Changes  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anycast/imports/": {
      "get": {
        "tags": [
          "anycast",
          "mongo"
        ],
        "summary": "List Imports",
        "description": "Newest-first audit rows for the import job — drives the admin\npanel's recent-runs table.",
        "operationId": "list_imports_anycast_imports__get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Imports Anycast Imports  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anycast/imports/run": {
      "post": {
        "tags": [
          "anycast",
          "mongo"
        ],
        "summary": "Run Import",
        "description": "Enqueue a full v4+v6 import on the background worker. Returns\nimmediately with the queue snapshot — the admin panel polls\n``GET /imports/`` for completion. The full pass is ~30s of\nupserts + diff + ``db.ips`` stamping, well past the 15s HTTP\ngateway timeout, so running it inline is not an option. The\nworker serialises with the scheduled cron path so the mark-and-\nsweep is race-free.",
        "operationId": "run_import_anycast_imports_run_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Run Import Anycast Imports Run Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/geofeeds/": {
      "get": {
        "tags": [
          "geofeeds",
          "admin",
          "mongo"
        ],
        "summary": "Admin Status",
        "description": "Header data for the admin panel — source count, prefix count,\nlast successful refresh ts, plus worker liveness.",
        "operationId": "admin_status_admin_geofeeds__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Status Admin Geofeeds  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/geofeeds/sources/": {
      "get": {
        "tags": [
          "geofeeds",
          "admin",
          "mongo"
        ],
        "summary": "List Sources",
        "description": "List geofeed sources with per-source row counts. ``enabled`` /\n``discovery`` filters mirror the admin-panel toggle chips.\n``duplicate`` filters on the merge marker (``False`` powers the\npanel's \"hide duplicates\" default; ``True`` shows only merged-away\nduplicates).",
        "operationId": "list_sources_admin_geofeeds_sources__get",
        "parameters": [
          {
            "name": "enabled",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Enabled"
            }
          },
          {
            "name": "discovery",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Discovery"
            }
          },
          {
            "name": "duplicate",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Duplicate"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 500,
              "title": "Limit"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Sources Admin Geofeeds Sources  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "geofeeds",
          "admin",
          "mongo"
        ],
        "summary": "Add Source",
        "description": "Manual add. URL must start with ``http://`` or ``https://``.",
        "operationId": "add_source_admin_geofeeds_sources__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceAddBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Add Source Admin Geofeeds Sources  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/geofeeds/sources": {
      "patch": {
        "tags": [
          "geofeeds",
          "admin",
          "mongo"
        ],
        "summary": "Patch Source",
        "description": "Update label, enabled flag, or verify_tls without re-importing.\n\nThe source URL is passed as a query parameter (not a path segment)\nso its scheme's ``//`` isn't collapsed to ``/`` in transit.",
        "operationId": "patch_source_admin_geofeeds_sources_patch",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The geofeed source URL (its _id).",
              "title": "Url"
            },
            "description": "The geofeed source URL (its _id)."
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourcePatchBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Patch Source Admin Geofeeds Sources Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "geofeeds",
          "admin",
          "mongo"
        ],
        "summary": "Delete Source",
        "description": "Remove the source row + sweep its prefixes. Returns the\ndeletion tally for the admin toast.\n\nThe source URL is passed as a query parameter (not a path segment)\nso its scheme's ``//`` isn't collapsed to ``/`` in transit.",
        "operationId": "delete_source_admin_geofeeds_sources_delete",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The geofeed source URL (its _id).",
              "title": "Url"
            },
            "description": "The geofeed source URL (its _id)."
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Delete Source Admin Geofeeds Sources Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/geofeeds/merge": {
      "post": {
        "tags": [
          "geofeeds",
          "admin",
          "mongo"
        ],
        "summary": "Merge Source",
        "description": "Mark ``source`` as a duplicate of ``into``: it's disabled, never\nfetched again, and its prefixes are swept (the survivor is\nauthoritative). The survivor absorbs the duplicate's provenance.\nReturns ``{duplicate, into, removed_prefixes}``.",
        "operationId": "merge_source_admin_geofeeds_merge_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MergeBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Merge Source Admin Geofeeds Merge Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/geofeeds/unmerge": {
      "post": {
        "tags": [
          "geofeeds",
          "admin",
          "mongo"
        ],
        "summary": "Unmerge Source",
        "description": "Undo a merge — clear the ``duplicate_of`` marker on ``url`` and\ndrop it from its survivor's aliases. The row stays disabled until the\noperator re-enables it.\n\nThe URL is a query parameter (not a path segment) so its scheme's\n``//`` isn't collapsed to ``/`` in transit.",
        "operationId": "unmerge_source_admin_geofeeds_unmerge_post",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The merged-away duplicate URL (its _id).",
              "title": "Url"
            },
            "description": "The merged-away duplicate URL (its _id)."
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Unmerge Source Admin Geofeeds Unmerge Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/geofeeds/refresh": {
      "post": {
        "tags": [
          "geofeeds",
          "admin",
          "mongo"
        ],
        "summary": "Trigger Refresh",
        "description": "Queue a refresh. Returns immediately with the queue depth +\nthe live progress state. UI polls ``/refresh/status`` for live\nupdates.",
        "operationId": "trigger_refresh_admin_geofeeds_refresh_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api__routers__geofeeds__RefreshBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Trigger Refresh Admin Geofeeds Refresh Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/geofeeds/refresh/status": {
      "get": {
        "tags": [
          "geofeeds",
          "admin",
          "mongo"
        ],
        "summary": "Get Refresh Status",
        "operationId": "get_refresh_status_admin_geofeeds_refresh_status_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Refresh Status Admin Geofeeds Refresh Status Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/geofeeds/discover": {
      "post": {
        "tags": [
          "geofeeds",
          "admin",
          "mongo"
        ],
        "summary": "Trigger Discovery",
        "description": "Queue the whois discovery scan. Walks\n``db.ips.whois.data.records[]`` for ``geofeed:`` attributes (RFC\n8805) + ``remarks: Geofeed …`` (RFC 9092); newly-found URLs are\nupserted with ``enabled=False`` so admin reviews before they're\nfetched.",
        "operationId": "trigger_discovery_admin_geofeeds_discover_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Trigger Discovery Admin Geofeeds Discover Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/geofeeds/discover/status": {
      "get": {
        "tags": [
          "geofeeds",
          "admin",
          "mongo"
        ],
        "summary": "Get Discovery Status",
        "operationId": "get_discovery_status_admin_geofeeds_discover_status_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Discovery Status Admin Geofeeds Discover Status Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/geofeeds/resolve-geonames": {
      "post": {
        "tags": [
          "geofeeds",
          "admin",
          "mongo"
        ],
        "summary": "Trigger Resolve Geonames",
        "description": "Queue a GeoNames-resolve pass over ``db.geofeed_prefixes``.\nStamps ``geonames_id`` on every prefix row whose ``country`` +\n``city`` resolves; coords for the cross-check map follow from the\nGeoNames link.",
        "operationId": "trigger_resolve_geonames_admin_geofeeds_resolve_geonames_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Trigger Resolve Geonames Admin Geofeeds Resolve Geonames Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/geofeeds/resolve-geonames/status": {
      "get": {
        "tags": [
          "geofeeds",
          "admin",
          "mongo"
        ],
        "summary": "Get Resolve Geonames Status",
        "operationId": "get_resolve_geonames_status_admin_geofeeds_resolve_geonames_status_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Resolve Geonames Status Admin Geofeeds Resolve Geonames Status Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/geofeeds/check-enable": {
      "post": {
        "tags": [
          "geofeeds",
          "admin",
          "mongo"
        ],
        "summary": "Trigger Check Enable",
        "description": "Queue a TLS check-and-enable pass: each **disabled**, non-duplicate\nsource is fetched over TLS (certificate verification on) and, if it\nsucceeds and returns ≥1 prefix, enabled. Background — poll\n``/check-enable/status``.",
        "operationId": "trigger_check_enable_admin_geofeeds_check_enable_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Trigger Check Enable Admin Geofeeds Check Enable Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/geofeeds/check-enable/status": {
      "get": {
        "tags": [
          "geofeeds",
          "admin",
          "mongo"
        ],
        "summary": "Get Check Enable Status",
        "operationId": "get_check_enable_status_admin_geofeeds_check_enable_status_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Check Enable Status Admin Geofeeds Check Enable Status Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/geofeeds/imports/": {
      "get": {
        "tags": [
          "geofeeds",
          "admin",
          "mongo"
        ],
        "summary": "List Imports",
        "operationId": "list_imports_admin_geofeeds_imports__get",
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source"
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Imports Admin Geofeeds Imports  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/geofeeds/imports/{import_id}": {
      "get": {
        "tags": [
          "geofeeds",
          "admin",
          "mongo"
        ],
        "summary": "Get Import",
        "operationId": "get_import_admin_geofeeds_imports__import_id__get",
        "parameters": [
          {
            "name": "import_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Import Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Import Admin Geofeeds Imports  Import Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/geofeeds/accuracy/run": {
      "post": {
        "tags": [
          "geofeeds",
          "admin",
          "mongo"
        ],
        "summary": "Accuracy Run",
        "description": "Recompute the accuracy snapshot now. Fire-and-forget — the scan\nover the geofeed-stamped ``db.ips`` subset can run past the gateway\ntimeout, so it's handed to a background task and recorded in\n``db.task_history`` (``derive_geofeed_accuracy``, trigger=manual).",
        "operationId": "accuracy_run_admin_geofeeds_accuracy_run_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Accuracy Run Admin Geofeeds Accuracy Run Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/geofeeds/lookup/{ip}": {
      "get": {
        "tags": [
          "geofeeds",
          "mongo"
        ],
        "summary": "Lookup Ip",
        "description": "Longest-prefix-match against ``db.geofeed_prefixes``. Returns\nthe same envelope :class:`api.atlas.geofeeds.Geofeeds`.summarize_ip``\nproduces, or ``null`` when no prefix covers the IP.",
        "operationId": "lookup_ip_geofeeds_lookup__ip__get",
        "parameters": [
          {
            "name": "ip",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Ip"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "additionalProperties": true
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Lookup Ip Geofeeds Lookup  Ip  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/geofeeds/accuracy/summary": {
      "get": {
        "tags": [
          "geofeeds",
          "mongo"
        ],
        "summary": "Accuracy Summary",
        "description": "Current accuracy rollup: per-source agreement %, mismatch counts,\nand the worst geofeed sources. ``null`` before the first snapshot.",
        "operationId": "accuracy_summary_geofeeds_accuracy_summary_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "additionalProperties": true
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Accuracy Summary Geofeeds Accuracy Summary Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/geofeeds/accuracy/mismatches": {
      "get": {
        "tags": [
          "geofeeds",
          "mongo"
        ],
        "summary": "Accuracy Mismatches",
        "description": "Country-mismatching IPs from the current snapshot — declared vs\neach inferred source — for investigation.",
        "operationId": "accuracy_mismatches_geofeeds_accuracy_mismatches_get",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter on the operator-declared country.",
              "title": "Country"
            },
            "description": "Filter on the operator-declared country."
          },
          {
            "name": "geofeed_source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter on the geofeed source URL.",
              "title": "Geofeed Source"
            },
            "description": "Filter on the geofeed source URL."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Accuracy Mismatches Geofeeds Accuracy Mismatches Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/geofeeds/accuracy/daily": {
      "get": {
        "tags": [
          "geofeeds",
          "mongo"
        ],
        "summary": "Accuracy Daily",
        "description": "Per-date agreement trend (oldest-first).",
        "operationId": "accuracy_daily_geofeeds_accuracy_daily_get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Accuracy Daily Geofeeds Accuracy Daily Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/weather/status/": {
      "get": {
        "tags": [
          "weather"
        ],
        "summary": "Get Status",
        "operationId": "get_status_weather_status__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Status Weather Status  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/weather/points/": {
      "get": {
        "tags": [
          "weather"
        ],
        "summary": "List Points",
        "operationId": "list_points_weather_points__get",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 5000,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Points Weather Points  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/weather/latest/": {
      "get": {
        "tags": [
          "weather"
        ],
        "summary": "Latest Map",
        "description": "Most-recent per-country temperature rollup — drives the choropleth.",
        "operationId": "latest_map_weather_latest__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Latest Map Weather Latest  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/weather/country/{cc}/series/": {
      "get": {
        "tags": [
          "weather"
        ],
        "summary": "Country Series",
        "operationId": "country_series_weather_country__cc__series__get",
        "parameters": [
          {
            "name": "cc",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cc"
            }
          },
          {
            "name": "start_ts",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Start Ts"
            }
          },
          {
            "name": "end_ts",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "End Ts"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response Country Series Weather Country  Cc  Series  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/weather/point/{point_id}/series/": {
      "get": {
        "tags": [
          "weather"
        ],
        "summary": "Point Series",
        "operationId": "point_series_weather_point__point_id__series__get",
        "parameters": [
          {
            "name": "point_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Point Id"
            }
          },
          {
            "name": "start_ts",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Start Ts"
            }
          },
          {
            "name": "end_ts",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "End Ts"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response Point Series Weather Point  Point Id  Series  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/weather/correlation/": {
      "get": {
        "tags": [
          "weather"
        ],
        "summary": "Correlation Top",
        "description": "Per-country temperature↔outage correlation, ranked by extreme-heat lift\n(``by=lift_p90``) or absolute correlation (``by=abs_r``).",
        "operationId": "correlation_top_weather_correlation__get",
        "parameters": [
          {
            "name": "by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "lift_p90",
              "title": "By"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response Correlation Top Weather Correlation  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/weather/correlation/cities/": {
      "get": {
        "tags": [
          "weather"
        ],
        "summary": "Correlation Cities",
        "description": "Per-city temperature↔outage correlation (finer than country), ranked by\nextreme-heat lift or absolute correlation.",
        "operationId": "correlation_cities_weather_correlation_cities__get",
        "parameters": [
          {
            "name": "by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "lift_p90",
              "title": "By"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response Correlation Cities Weather Correlation Cities  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/weather/correlation/city/{gid}/": {
      "get": {
        "tags": [
          "weather"
        ],
        "summary": "Correlation City",
        "operationId": "correlation_city_weather_correlation_city__gid___get",
        "parameters": [
          {
            "name": "gid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Gid"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Correlation City Weather Correlation City  Gid   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/weather/correlation/city/{gid}/overlay/": {
      "get": {
        "tags": [
          "weather"
        ],
        "summary": "Correlation City Overlay",
        "description": "Per-hour ``{t2m_mean, disconnects}`` for one city's dual-axis chart.",
        "operationId": "correlation_city_overlay_weather_correlation_city__gid__overlay__get",
        "parameters": [
          {
            "name": "gid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Gid"
            }
          },
          {
            "name": "start_ts",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Start Ts"
            }
          },
          {
            "name": "end_ts",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "End Ts"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response Correlation City Overlay Weather Correlation City  Gid  Overlay  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/weather/correlation/{cc}/": {
      "get": {
        "tags": [
          "weather"
        ],
        "summary": "Correlation Country",
        "operationId": "correlation_country_weather_correlation__cc___get",
        "parameters": [
          {
            "name": "cc",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cc"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Correlation Country Weather Correlation  Cc   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/weather/correlation/{cc}/overlay/": {
      "get": {
        "tags": [
          "weather"
        ],
        "summary": "Correlation Overlay",
        "description": "Per-hour ``{t2m_mean, disconnects}`` for the dual-axis temp-vs-outage\nchart.",
        "operationId": "correlation_overlay_weather_correlation__cc__overlay__get",
        "parameters": [
          {
            "name": "cc",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cc"
            }
          },
          {
            "name": "start_ts",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Start Ts"
            }
          },
          {
            "name": "end_ts",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "End Ts"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response Correlation Overlay Weather Correlation  Cc  Overlay  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/weather/alerts/": {
      "get": {
        "tags": [
          "weather"
        ],
        "summary": "List Alerts",
        "description": "Places where extreme weather currently coincides with elevated probe\ndisconnects. ``scope=country`` | ``city`` filters the granularity (both when\nomitted); ``only_open=false`` includes recently-closed episodes.",
        "operationId": "list_alerts_weather_alerts__get",
        "parameters": [
          {
            "name": "only_open",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true,
              "title": "Only Open"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Scope"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Alerts Weather Alerts  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/weather/imports/": {
      "get": {
        "tags": [
          "weather",
          "admin"
        ],
        "summary": "List Imports",
        "operationId": "list_imports_admin_weather_imports__get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Imports Admin Weather Imports  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/unlocode/status/": {
      "get": {
        "tags": [
          "unlocode",
          "mongo"
        ],
        "summary": "Get Status",
        "description": "Admin-header tiles + worker snapshot.",
        "operationId": "get_status_unlocode_status__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Status Unlocode Status  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/unlocode/imports/": {
      "get": {
        "tags": [
          "unlocode",
          "mongo"
        ],
        "summary": "List Imports",
        "description": "Newest-first import-run rows. ``since`` / ``until`` inclusive\n``YYYY-MM-DD`` bounds on ``started_at``.",
        "operationId": "list_imports_unlocode_imports__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "trigger",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Trigger"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Imports Unlocode Imports  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/unlocode/imports/{import_id}/": {
      "get": {
        "tags": [
          "unlocode",
          "mongo"
        ],
        "summary": "Get Import",
        "operationId": "get_import_unlocode_imports__import_id___get",
        "parameters": [
          {
            "name": "import_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Import Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Import Unlocode Imports  Import Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/unlocode/imports/run": {
      "post": {
        "tags": [
          "unlocode",
          "mongo"
        ],
        "summary": "Run Import",
        "description": "Queue the import. Returns immediately; the serial worker picks\nit up and writes the ``running`` audit row. 403 when the dataset\nis disabled.",
        "operationId": "run_import_unlocode_imports_run_post",
        "parameters": [
          {
            "name": "force",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Re-run even if the source commit is unchanged (otherwise the import skips a no-op download).",
              "default": false,
              "title": "Force"
            },
            "description": "Re-run even if the source commit is unchanged (otherwise the import skips a no-op download)."
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Run Import Unlocode Imports Run Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/unlocode/function-classifiers/": {
      "get": {
        "tags": [
          "unlocode",
          "mongo"
        ],
        "summary": "Function Classifiers",
        "description": "The 10-row Function-flag legend (bundled, static) so the UI can\ndecode the 8-position ``data.function`` string.",
        "operationId": "function_classifiers_unlocode_function_classifiers__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Function Classifiers Unlocode Function Classifiers  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/unlocode/anchor-fqdn/": {
      "get": {
        "tags": [
          "unlocode",
          "mongo"
        ],
        "summary": "Anchor Fqdn",
        "description": "Derive candidate anchor FQDN(s) from the nearest UN/LOCODE(s)\nto ``(lat, lon)``.\n\n**Public — no auth gate** (pure derivation over open UN/LOCODE\nreference data + a public-FQDN existence flag; same posture as the\npublic ``/series/`` reads). Unlike the other ``/unlocode`` reads\nthis one is intentionally unauthenticated.\n\nFor each of the ``n`` nearest UN/LOCODE records (by great-circle\ndistance over the coords-bearing subset) we assemble\n``<cc>-<loc>-as<asn>.anchors.atlas.ripe.net`` and flag whether an\nanchor with that exact FQDN already exists (one batched\n``db.anchors`` lookup). Pure read — no writes, no RIPE calls; the\ncaller decides what to do with a collision (we don't guess RIPE's\nmulti-anchor numbering). Declared before ``/{code}/`` so the\nliteral segment wins. 400 on out-of-range lat/lon/asn/n.",
        "operationId": "anchor_fqdn_unlocode_anchor_fqdn__get",
        "parameters": [
          {
            "name": "lat",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "maximum": 90,
              "minimum": -90,
              "title": "Lat"
            }
          },
          {
            "name": "lon",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "maximum": 180,
              "minimum": -180,
              "title": "Lon"
            }
          },
          {
            "name": "asn",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "AS number for the as<asn> segment",
              "title": "Asn"
            },
            "description": "AS number for the as<asn> segment"
          },
          {
            "name": "n",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 25,
              "minimum": 1,
              "description": "how many nearest candidates",
              "default": 1,
              "title": "N"
            },
            "description": "how many nearest candidates"
          },
          {
            "name": "asn_holder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "True/omitted = anchor host holds the ASN (plain hostname). False = host is a client → append '-client' to the hostname label.",
              "default": true,
              "title": "Asn Holder"
            },
            "description": "True/omitted = anchor host holds the ASN (plain hostname). False = host is a client → append '-client' to the hostname label."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Anchor Fqdn Unlocode Anchor Fqdn  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/unlocode/": {
      "get": {
        "tags": [
          "unlocode",
          "mongo"
        ],
        "summary": "Search",
        "description": "Lookup by country / name-or-code / alias / nearest.",
        "operationId": "search_unlocode__get",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "ISO cca2 filter",
              "title": "Country"
            },
            "description": "ISO cca2 filter"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "code / name / alias prefix",
              "title": "Q"
            },
            "description": "code / name / alias prefix"
          },
          {
            "name": "near",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "\"lat,lon\" nearest",
              "title": "Near"
            },
            "description": "\"lat,lon\" nearest"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Search Unlocode  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/unlocode/{code}/changes/": {
      "get": {
        "tags": [
          "unlocode",
          "mongo"
        ],
        "summary": "List Changes",
        "description": "Per-record change history (newest-first).",
        "operationId": "list_changes_unlocode__code__changes__get",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Code"
            }
          },
          {
            "name": "since_ts",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since Ts"
            }
          },
          {
            "name": "until_ts",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until Ts"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Changes Unlocode  Code  Changes  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/unlocode/{code}/neighbors/": {
      "get": {
        "tags": [
          "unlocode",
          "mongo"
        ],
        "summary": "Get Neighbors",
        "description": "The code plus its ``limit`` nearest *other* UN/LOCODEs (for the\ndetail-view map: the selected location + its closest neighbours).\n404 when unknown or coordinate-less (nothing to plot). Declared\nbefore ``/{code}/`` so the literal segment wins.",
        "operationId": "get_neighbors_unlocode__code__neighbors__get",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Code"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 25,
              "minimum": 1,
              "description": "how many nearest others",
              "default": 10,
              "title": "Limit"
            },
            "description": "how many nearest others"
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Neighbors Unlocode  Code  Neighbors  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/unlocode/{code}/": {
      "get": {
        "tags": [
          "unlocode",
          "mongo"
        ],
        "summary": "Get Code",
        "description": "Single code + joined aliases. 404 when unknown.",
        "operationId": "get_code_unlocode__code___get",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Code"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Code Unlocode  Code   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/gotosocial/check": {
      "get": {
        "tags": [
          "admin",
          "gotosocial"
        ],
        "summary": "Check Connection",
        "description": "Round-trip the GoToSocial token + read instance metadata.\n\nReturns ``{\"ok\": True, \"account\": {...}, \"instance\": {...}}`` on\nsuccess, or ``{\"ok\": False, \"status\": <int>, ...}`` when either\ncall fails — the operator UI can render the failure detail\ndirectly. Never raises: ``status_code == 0`` from the wrapper\nmeans the request didn't reach the server (DNS / connect timeout\n/ TLS error), which we surface as ``ok: False`` like any other\nerror.",
        "operationId": "check_connection_admin_gotosocial_check_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Check Connection Admin Gotosocial Check Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/gotosocial/post": {
      "post": {
        "tags": [
          "admin",
          "gotosocial"
        ],
        "summary": "Post Status",
        "description": "Manual ad-hoc post to GoToSocial.\n\nWraps :meth:`GotoSocial.post_status` with no extra processing —\nthe operator types a message, picks a visibility, hits Send.\nSame token, same instance, no preview / scheduling.\n\nReturns the raw upstream payload (id + url + content + …) on\nsuccess so the UI can render a \"view post\" link straight to the\nnew status. On a non-200 from upstream we map to a 502 with the\nerror detail attached, so axios on the frontend surfaces the\nfailure naturally rather than rendering a \"successful\" empty\nresponse.",
        "operationId": "post_status_admin_gotosocial_post_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Post Status Admin Gotosocial Post Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/gotosocial/preview/{kind}": {
      "get": {
        "tags": [
          "admin",
          "gotosocial"
        ],
        "summary": "Preview Post",
        "description": "Render the text a scheduled post *would* publish — no post made.",
        "operationId": "preview_post_admin_gotosocial_preview__kind__get",
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Kind"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Preview Post Admin Gotosocial Preview  Kind  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/gotosocial/run/{kind}": {
      "post": {
        "tags": [
          "admin",
          "gotosocial"
        ],
        "summary": "Run Post",
        "description": "Fire one scheduled post now. Bypasses the enable flag (admin\nintent) but still dedups on the day/week key.",
        "operationId": "run_post_admin_gotosocial_run__kind__post",
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Kind"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Run Post Admin Gotosocial Run  Kind  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/graphs/probes/new/": {
      "get": {
        "tags": [
          "graphs",
          "graphs",
          "probes",
          "mongo"
        ],
        "summary": "Get Probes New",
        "description": "New-probes graph — Mongo-backed.\n\nReplaces the legacy CouchDB implementation. Same wire surface,\nsame envelope shape; filters and group dimensions that depend on\ndata not yet in Mongo are accepted but ignored, with their names\nechoed in ``dropped_filters`` / ``dropped_groups`` so the UI can\nsurface a notice.",
        "operationId": "get_probes_new_graphs_probes_new__get",
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "name": "stop",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Stop"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/DateParameter"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date"
            }
          },
          {
            "name": "group",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GraphGroup"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "default": [
                "days"
              ],
              "title": "Group"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "City"
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Region"
            }
          },
          {
            "name": "asn",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Asn"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "firmware_version",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Firmware Version"
            }
          },
          {
            "name": "anchors",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anchors"
            }
          },
          {
            "name": "explain",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Explain"
            }
          },
          {
            "name": "query_field",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Query Field"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10000,
              "title": "Limit"
            }
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Version"
            }
          },
          {
            "name": "reporting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Reporting"
            }
          },
          {
            "name": "hardware",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Hardware"
            }
          },
          {
            "name": "eyeballs",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Eyeballs"
            }
          },
          {
            "name": "report_2024",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Report 2024"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/graphs/probes/new/list/": {
      "get": {
        "tags": [
          "graphs",
          "graphs",
          "probes",
          "mongo"
        ],
        "summary": "Get Probes New List",
        "description": "New-probes flat list — Mongo-backed.\n\nCompanion to :func:`get_probes_new`; shares the same selector\nsemantics but returns one ``rows`` entry per matching probe (no\ngrouping) with the table columns: id, description, country, ASN,\nstatus, type, city, first_connected. No ``group`` parameter — this\nisn't a grouping view.",
        "operationId": "get_probes_new_list_graphs_probes_new_list__get",
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "name": "stop",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Stop"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/DateParameter"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "City"
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Region"
            }
          },
          {
            "name": "asn",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Asn"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "firmware_version",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Firmware Version"
            }
          },
          {
            "name": "anchors",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anchors"
            }
          },
          {
            "name": "query_field",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Query Field"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10000,
              "title": "Limit"
            }
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Version"
            }
          },
          {
            "name": "reporting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Reporting"
            }
          },
          {
            "name": "hardware",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Hardware"
            }
          },
          {
            "name": "eyeballs",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Eyeballs"
            }
          },
          {
            "name": "report_2024",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Report 2024"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/graphs/probes/new/map/": {
      "get": {
        "tags": [
          "graphs",
          "graphs",
          "probes",
          "maps",
          "mongo"
        ],
        "summary": "Get Probes New Map",
        "description": "New-probes geographic projection — Mongo-backed.\n\nCompanion to :func:`get_probes_new`; shares the same selector\nsemantics so the bar-chart and the map tab in the frontend stay\ncoherent. Returns one ``points`` entry per matching probe that\nhas a public location. Probes with ``data.geometry == null``\nare excluded; the omitted count is surfaced separately so the\nfrontend can render a \"X have no public location\" caption.\n\nNo ``group`` parameter — this isn't a grouping view; the bar-chart\nendpoint owns that.",
        "operationId": "get_probes_new_map_graphs_probes_new_map__get",
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "name": "stop",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Stop"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/DateParameter"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "City"
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Region"
            }
          },
          {
            "name": "asn",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Asn"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "firmware_version",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Firmware Version"
            }
          },
          {
            "name": "anchors",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anchors"
            }
          },
          {
            "name": "query_field",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Query Field"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10000,
              "title": "Limit"
            }
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Version"
            }
          },
          {
            "name": "reporting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Reporting"
            }
          },
          {
            "name": "hardware",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Hardware"
            }
          },
          {
            "name": "eyeballs",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Eyeballs"
            }
          },
          {
            "name": "report_2024",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Report 2024"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/targets/": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "List Targets",
        "operationId": "list_targets_monitoring_targets__get",
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kind"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tag"
            }
          },
          {
            "name": "enabled",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Enabled"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 500,
              "title": "Limit"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "all",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Admin-only: include every user's targets.",
              "default": false,
              "title": "All"
            },
            "description": "Admin-only: include every user's targets."
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Targets Monitoring Targets  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "monitoring"
        ],
        "summary": "Create Target",
        "operationId": "create_target_monitoring_targets__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TargetCreateBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Create Target Monitoring Targets  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/targets/{target_id}": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "Get Target",
        "operationId": "get_target_monitoring_targets__target_id__get",
        "parameters": [
          {
            "name": "target_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Target Id"
            }
          },
          {
            "name": "all",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "All"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Target Monitoring Targets  Target Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "monitoring"
        ],
        "summary": "Patch Target",
        "operationId": "patch_target_monitoring_targets__target_id__patch",
        "parameters": [
          {
            "name": "target_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Target Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TargetPatchBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Patch Target Monitoring Targets  Target Id  Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "monitoring"
        ],
        "summary": "Delete Target",
        "description": "Delete a target + cascade-sweep its checks. The substrate\nclasses are deliberately single-purpose — the route owns the\ncross-collection cascade including stopping every UDM that\nthe swept checks had spawned.",
        "operationId": "delete_target_monitoring_targets__target_id__delete",
        "parameters": [
          {
            "name": "target_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Target Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Delete Target Monitoring Targets  Target Id  Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/targets/{target_id}/checks/": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "List Target Checks",
        "operationId": "list_target_checks_monitoring_targets__target_id__checks__get",
        "parameters": [
          {
            "name": "target_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Target Id"
            }
          },
          {
            "name": "enabled",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Enabled"
            }
          },
          {
            "name": "all",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "All"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Target Checks Monitoring Targets  Target Id  Checks  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "monitoring"
        ],
        "summary": "Create Check",
        "operationId": "create_check_monitoring_targets__target_id__checks__post",
        "parameters": [
          {
            "name": "target_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Target Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckCreateBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Create Check Monitoring Targets  Target Id  Checks  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/checks/{check_id}": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "Get Check",
        "operationId": "get_check_monitoring_checks__check_id__get",
        "parameters": [
          {
            "name": "check_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Check Id"
            }
          },
          {
            "name": "all",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "All"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Check Monitoring Checks  Check Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "monitoring"
        ],
        "summary": "Patch Check",
        "operationId": "patch_check_monitoring_checks__check_id__patch",
        "parameters": [
          {
            "name": "check_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Check Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckPatchBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Patch Check Monitoring Checks  Check Id  Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "monitoring"
        ],
        "summary": "Delete Check",
        "operationId": "delete_check_monitoring_checks__check_id__delete",
        "parameters": [
          {
            "name": "check_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Check Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Delete Check Monitoring Checks  Check Id  Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/checks/{check_id}/rerun": {
      "post": {
        "tags": [
          "monitoring"
        ],
        "summary": "Rerun Check",
        "description": "Force the check to run on the next worker tick — clears\n``next_due_ts`` so the drain loop picks it up regardless of\nbackoff. Useful after fixing a misconfigured API key, raising\na budget cap, or deploying an executor change: an operator can\npoke the check instead of waiting out the unknown-status\nbackoff (which can be several minutes after a failed spawn).\n\nOwner-scoped: a non-admin can only rerun their own checks.",
        "operationId": "rerun_check_monitoring_checks__check_id__rerun_post",
        "parameters": [
          {
            "name": "check_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Check Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Rerun Check Monitoring Checks  Check Id  Rerun Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/channels/": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "List Channels",
        "operationId": "list_channels_monitoring_channels__get",
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kind"
            }
          },
          {
            "name": "enabled",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Enabled"
            }
          },
          {
            "name": "all",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "All"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Channels Monitoring Channels  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "monitoring"
        ],
        "summary": "Create Channel",
        "operationId": "create_channel_monitoring_channels__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelCreateBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Create Channel Monitoring Channels  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/channels/{channel_id}": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "Get Channel",
        "operationId": "get_channel_monitoring_channels__channel_id__get",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Channel Id"
            }
          },
          {
            "name": "all",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "All"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Channel Monitoring Channels  Channel Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "monitoring"
        ],
        "summary": "Patch Channel",
        "operationId": "patch_channel_monitoring_channels__channel_id__patch",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Channel Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelPatchBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Patch Channel Monitoring Channels  Channel Id  Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "monitoring"
        ],
        "summary": "Delete Channel",
        "operationId": "delete_channel_monitoring_channels__channel_id__delete",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Channel Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Delete Channel Monitoring Channels  Channel Id  Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/meta/": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "Get Meta",
        "description": "Static catalogue of every kind / check the UI can offer.\nPulled from the substrate's source-of-truth tables so the\nfrontend doesn't have to duplicate them. Cheap; fine to ship\non every page load.",
        "operationId": "get_meta_monitoring_meta__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Meta Monitoring Meta  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/alerts/": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "List Alerts",
        "operationId": "list_alerts_monitoring_alerts__get",
        "parameters": [
          {
            "name": "target_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Target Id"
            }
          },
          {
            "name": "check_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Check Id"
            }
          },
          {
            "name": "severity",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Severity"
            }
          },
          {
            "name": "only_open",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "true = open alerts only (default), false = closed only, omit for both.",
              "default": true,
              "title": "Only Open"
            },
            "description": "true = open alerts only (default), false = closed only, omit for both."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 200,
              "title": "Limit"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "all",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "All"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Alerts Monitoring Alerts  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/alerts/{alert_id}": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "Get Alert",
        "operationId": "get_alert_monitoring_alerts__alert_id__get",
        "parameters": [
          {
            "name": "alert_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Alert Id"
            }
          },
          {
            "name": "all",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "All"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Alert Monitoring Alerts  Alert Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/alerts/{alert_id}/narrative": {
      "post": {
        "tags": [
          "monitoring"
        ],
        "summary": "Generate Alert Narrative",
        "description": "Write an LLM triage note for one alert (fire-and-forget).\n\nA deterministic evidence packet — the alert, its check and target,\nand the recent result history with its failure *shape* — is computed\nfirst; the model only narrates it, and any draft asserting a figure\nthe packet can't support is rejected.\n\nOwner-scoped: a non-admin can only narrate their own alerts. Poll\n``GET`` for the result. 400 on an unknown model alias or an alert\nthat isn't visible to this caller.",
        "operationId": "generate_alert_narrative_monitoring_alerts__alert_id__narrative_post",
        "parameters": [
          {
            "name": "alert_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Alert Id"
            }
          },
          {
            "name": "all",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "All"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertNarrativeBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Generate Alert Narrative Monitoring Alerts  Alert Id  Narrative Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "Get Alert Narratives",
        "description": "Stored triage notes for an alert — at most one per model, so a\nchat and a reasoner take can be compared. Each carries the evidence\npacket it was written from, for audit. Owner-scoped.",
        "operationId": "get_alert_narratives_monitoring_alerts__alert_id__narrative_get",
        "parameters": [
          {
            "name": "alert_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Alert Id"
            }
          },
          {
            "name": "all",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "All"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Alert Narratives Monitoring Alerts  Alert Id  Narrative Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/alerts/{alert_id}/ack": {
      "post": {
        "tags": [
          "monitoring"
        ],
        "summary": "Ack Alert",
        "operationId": "ack_alert_monitoring_alerts__alert_id__ack_post",
        "parameters": [
          {
            "name": "alert_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Alert Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertAckBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Ack Alert Monitoring Alerts  Alert Id  Ack Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/alerts/{alert_id}/snooze": {
      "post": {
        "tags": [
          "monitoring"
        ],
        "summary": "Snooze Alert",
        "operationId": "snooze_alert_monitoring_alerts__alert_id__snooze_post",
        "parameters": [
          {
            "name": "alert_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Alert Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertSnoozeBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Snooze Alert Monitoring Alerts  Alert Id  Snooze Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/alerts/{alert_id}/close": {
      "post": {
        "tags": [
          "monitoring"
        ],
        "summary": "Close Alert",
        "description": "Operator-triggered manual close. Distinct from the\nauto-close path the state machine takes on a recovery — useful\nfor known maintenance windows.",
        "operationId": "close_alert_monitoring_alerts__alert_id__close_post",
        "parameters": [
          {
            "name": "alert_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Alert Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertCloseBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Close Alert Monitoring Alerts  Alert Id  Close Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/checks/{check_id}/results/": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "List Check Results",
        "description": "Newest-first time-series for one check. Per-user\n``owner`` scope is enforced via the parent check — a non-admin\nrequesting another user's check_id gets 404.",
        "operationId": "list_check_results_monitoring_checks__check_id__results__get",
        "parameters": [
          {
            "name": "check_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Check Id"
            }
          },
          {
            "name": "since_ts",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since Ts"
            }
          },
          {
            "name": "until_ts",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until Ts"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 500,
              "title": "Limit"
            }
          },
          {
            "name": "all",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "All"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Check Results Monitoring Checks  Check Id  Results  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/budget/": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "Get My Budget",
        "description": "Today's UDM-spawn budget for the caller — used / cap so the\nUI can warn when a user is approaching their daily cap. Always\nscoped to the caller; admin uses ``/admin/budget/`` to see\nother users.",
        "operationId": "get_my_budget_monitoring_budget__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get My Budget Monitoring Budget  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/admin/pipeline-health/": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "Pipeline Health",
        "description": "Notification-pipeline diagnostic: enabled checks, open alerts, and\nconfigured channels rolled up globally and **per owner**, plus the\nrecent ``monitoring_drain`` delivery stats. Answers \"is anything\ntriggering notifications?\" — the per-owner ``gap`` field pinpoints\nwhere the chain is empty (checks but no channel, alerts open but no\nchannel, inbox-only). ``drain_lookback`` = recent drain audit rows to\nfold (default 60 ≈ last hour).",
        "operationId": "pipeline_health_monitoring_admin_pipeline_health__get",
        "parameters": [
          {
            "name": "drain_lookback",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1440,
              "minimum": 1,
              "default": 60,
              "title": "Drain Lookback"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Pipeline Health Monitoring Admin Pipeline Health  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/admin/budget/": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "List All Budgets",
        "description": "List every user's today-row, sorted by used desc — drives the\nadmin panel. Includes the deployment default cap so the operator\ncan see what new users land on.",
        "operationId": "list_all_budgets_monitoring_admin_budget__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List All Budgets Monitoring Admin Budget  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/admin/budget/{owner}/cap": {
      "post": {
        "tags": [
          "monitoring"
        ],
        "summary": "Set User Cap",
        "description": "Override one user's cap for today. Affects the current UTC\nday only — by design, raising a cap is a *temporary* unblock; if\nthe user genuinely needs more head-room every day the operator\nshould bump ``MONITORING_DEFAULT_DAILY_UDM_SPAWN_CAP`` and\nrestart. Returns the persisted row so the UI can re-render the\ntable without a refetch.",
        "operationId": "set_user_cap_monitoring_admin_budget__owner__cap_post",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Owner"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BudgetSetCapBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Set User Cap Monitoring Admin Budget  Owner  Cap Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes/tags/": {
      "get": {
        "tags": [
          "probes",
          "probes",
          "mongo"
        ],
        "summary": "List Probe Tags",
        "description": "Distinct ``{slug, name}`` pairs across the tags carried by\nevery probe in ``db.probes``. Powers the tag dropdown in the\nprobe-list view; declared *before* any ``/{probe_id}/...``\nroute so the literal ``tags`` segment doesn't get matched as\nan int id and 422'd by FastAPI's path coercion.",
        "operationId": "list_probe_tags_probes_tags__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "type": "array",
                  "title": "Response List Probe Tags Probes Tags  Get"
                }
              }
            }
          }
        }
      }
    },
    "/probes/firmwares/": {
      "get": {
        "tags": [
          "probes",
          "probes",
          "mongo"
        ],
        "summary": "List Probe Firmwares",
        "description": "Distinct firmware-version integers in use across\n``db.probes``, newest first. Powers the firmware dropdown in the\nprobe-list view so the operator sees only versions that exist\non at least one probe. Same path-ordering caveat as\n``/probes/tags/`` — declared before any ``/{probe_id}/...``\ncatch.",
        "operationId": "list_probe_firmwares_probes_firmwares__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "type": "integer"
                  },
                  "type": "array",
                  "title": "Response List Probe Firmwares Probes Firmwares  Get"
                }
              }
            }
          }
        }
      }
    },
    "/probes/stats/": {
      "get": {
        "tags": [
          "probes",
          "probes",
          "mongo"
        ],
        "summary": "Get Probe Stats",
        "description": "Whole-fleet distribution stats over ``db.probes`` (current\nstate).\n\nNo filters → the cached rollup snapshot (lazy-populated on first\nmiss, so the public page is never empty), carrying\n``computed_at``. Any of ``status`` / ``anchors_only`` / ``country``\n→ a live, uncached recompute with an extra ``$match`` (``live:\ntrue``). Public read — aggregate counts over public RIPE probe\nmetadata, same posture as ``/statistics/anchors``.\n\nDeclared *before* the ``/{probe_id}/...`` routes so the literal\n``stats`` segment isn't coerced to an int id (same caveat as\n``/probes/tags/`` and ``/probes/firmwares/``). Wrapped in\n:func:`asyncio.to_thread` — the aggregation is blocking PyMongo.",
        "operationId": "get_probe_stats_probes_stats__get",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "anchors_only",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anchors Only"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes/stats/refresh": {
      "post": {
        "tags": [
          "probes",
          "probes",
          "mongo"
        ],
        "summary": "Refresh Probe Stats",
        "description": "Recompute the whole-fleet stats snapshot now (DB-only, no\nRIPE). Heavy at fleet scale, so it's off the hot path and wrapped\nin :func:`run_and_record` (lands in ``db.task_history``). Returns\nthe freshly-written rollup doc. The same refresh also runs on\nevery probe-refresh cron tick / manual probe refresh.",
        "operationId": "refresh_probe_stats_probes_stats_refresh_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Refresh Probe Stats Probes Stats Refresh Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes/{probe_id}/changes/": {
      "get": {
        "tags": [
          "probes",
          "probes",
          "mongo"
        ],
        "summary": "Get Probe Changes",
        "description": "Most-recent-first change events for a probe from\n``db.probes_history``.\n\nLogged-in only — matches the :class:`probes_archive` reader.\nEach row is one refresh-tick where at least one tracked field\nchanged, with the diff under ``changes``. Distinct from the\nlegacy ``/{probe_id}/history/`` endpoint above, which still\ntalks to CouchDB.",
        "operationId": "get_probe_changes_probes__probe_id__changes__get",
        "parameters": [
          {
            "name": "probe_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Probe Id"
            }
          },
          {
            "name": "since_ts",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since Ts"
            }
          },
          {
            "name": "until_ts",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until Ts"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response Get Probe Changes Probes  Probe Id  Changes  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes/{probe_id}/nearest/": {
      "get": {
        "tags": [
          "probes",
          "probes",
          "mongo"
        ],
        "summary": "Get Nearest Probes",
        "description": "N probes closest (great-circle) to the given probe.\n\nPublic read — probe locations are already exposed via the\nnew-probes / probe-list map views; nothing new disclosed here.\nExcludes the target probe from the result. Returns ``[]`` when\nthe target is missing or has no usable geometry.",
        "operationId": "get_nearest_probes_probes__probe_id__nearest__get",
        "parameters": [
          {
            "name": "probe_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Probe Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes/{probe_id}/cached/": {
      "get": {
        "tags": [
          "probes",
          "probes",
          "mongo"
        ],
        "summary": "Get Probe Cached",
        "description": "Mongo-first single-probe lookup over ``db.probes``.\n\nServes the cached envelope whenever the probe exists in\n``db.probes`` — the hourly fleet cron (which paginates the whole\npublic ``/probes/`` set) keeps it current, so the common path is a\npure Mongo read and never touches RIPE. Only a genuine cache-miss\n(a probe registered since the last fleet pass) or\n``?refresh=true`` refetches *this one probe* from RIPE, applying\nthe same diff/``probes_history``/new-probe-announcer/city-enrichment\na cron refresh would.\n\nPublic (the probe-detail page + measurement-map markers are\npublic — same posture as the legacy RIPE-proxied lookup it\nreplaces). 404 when RIPE doesn't know a not-yet-cached id, 403 when\nthe probe is private (both pass-through — never negatively cached),\n502 on a transient RIPE failure. Returns ``{source, data, meta,\nenrichments}`` (``source`` = ``cache`` | ``ripe``); the wrapper\nunwraps ``data`` for the existing ``RipeProbe`` consumers.\n\nWrapped in ``asyncio.to_thread`` — the Mongo read is blocking\nPyMongo, and the rare cache-miss adds a synchronous RIPE\nround-trip (bounded by the RIPE HTTP timeout).",
        "operationId": "get_probe_cached_probes__probe_id__cached__get",
        "parameters": [
          {
            "name": "probe_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Probe Id"
            }
          },
          {
            "name": "refresh",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Refresh"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Probe Cached Probes  Probe Id  Cached  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes/": {
      "get": {
        "tags": [
          "probes",
          "probes",
          "mongo"
        ],
        "summary": "List Probes",
        "description": "Filtered list of probes — Mongo-backed.\n\nReplaces the historical CouchDB-backed implementation; envelope\nshape is preserved (``count`` / ``time`` / ``query`` / ``results``).\nFilters that depend on data not yet in Mongo\n(``version`` / ``dnsmon`` / ``controller``) are accepted but\nignored, with the requested names echoed in a ``dropped_filters``\narray so the UI can surface a notice. ``reporting`` is now\nMongo-native — the refresh job persists\n``enrichments.reporting`` and the selector matches it directly.",
        "operationId": "list_probes_probes__get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1000,
              "title": "Limit"
            }
          },
          {
            "name": "probe_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Probe Id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "name": "stop",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Stop"
            }
          },
          {
            "name": "status_since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status Since"
            }
          },
          {
            "name": "asn",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Asn"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tag"
            }
          },
          {
            "name": "anchor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anchor"
            }
          },
          {
            "name": "first_connected",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "First Connected"
            }
          },
          {
            "name": "last_connected",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Last Connected"
            }
          },
          {
            "name": "firmware",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Firmware"
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Region"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "City"
            }
          },
          {
            "name": "public",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Public"
            }
          },
          {
            "name": "reporting",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Reporting"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "count_only",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Count Only"
            }
          },
          {
            "name": "field",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Field"
            }
          },
          {
            "name": "explain",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Explain"
            }
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Version"
            }
          },
          {
            "name": "dnsmon",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Dnsmon"
            }
          },
          {
            "name": "controller",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Controller"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/DateParameter"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Path"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-archive/daily/": {
      "get": {
        "tags": [
          "probes",
          "archive",
          "mongo"
        ],
        "summary": "List Daily",
        "description": "Newest-first list of daily-summary rows.\n\nAdmin-gated because the rows carry ``error`` tracebacks. Optional\n``since`` / ``until`` are inclusive ``YYYY-MM-DD`` bounds; ``limit``\nclamped to 1000 by the storage layer.\n\n``lite=true`` projects away the heavy ``stats`` block and the\n``error`` traceback — useful for whole-year fetches like the\nadmin calendar view where only the per-day status pill is\nrendered. Drops a year-wide payload from ~3 MB to ~50 KB.",
        "operationId": "list_daily_probes_archive_daily__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "lite",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Lite"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Daily Probes Archive Daily  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-archive/daily/{date}/": {
      "get": {
        "tags": [
          "probes",
          "archive",
          "mongo"
        ],
        "summary": "Get Daily",
        "description": "Single daily-summary row including the full stats block.",
        "operationId": "get_daily_probes_archive_daily__date___get",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Daily Probes Archive Daily  Date   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-archive/daily/{date}/stop": {
      "post": {
        "tags": [
          "probes",
          "archive",
          "mongo"
        ],
        "summary": "Stop Daily",
        "description": "Stop a queued or running daily import (cooperative).\n\n``queued`` → ``import_day``'s entry-check writes a terminal\n``stopped`` row without importing. ``running`` → the per-batch\ncheckpoint bails, finishing as ``stopped`` with the probe rows\nthat already landed preserved (stats deliberately not recomputed\nover a partial import — re-backfill the date for a clean stats\nblock). Already-terminal / missing → 409 / 404.",
        "operationId": "stop_daily_probes_archive_daily__date__stop_post",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Stop Daily Probes Archive Daily  Date  Stop Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-archive/daily/{date}/run": {
      "post": {
        "tags": [
          "probes",
          "archive",
          "mongo"
        ],
        "summary": "Run Daily",
        "description": "Synchronous import-run for one date — admin cookie-session.\n\nBlocks for the duration of the import (~minutes for ~50k probes).\nSame audit wiring as the api-key-gated\n``POST /atlas/probes-archive/refresh/`` endpoint in\n:mod:`api.main` — both go through :func:`run_and_record` so\n``db.task_history`` and ``db.probes_archive_daily`` stay in sync.",
        "operationId": "run_daily_probes_archive_daily__date__run_post",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Run Daily Probes Archive Daily  Date  Run Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-archive/daily/{date}/recompute-stats": {
      "post": {
        "tags": [
          "probes",
          "archive",
          "mongo"
        ],
        "summary": "Recompute Daily Stats",
        "description": "Rebuild the stats block for one date from saved archive rows.\n\nNo RIPE call — reads only ``db.probes_archive``. Useful when the\nstats schema gains new fields (e.g. cross-tabs added later) and\nhistorical rows need backfilling, or when an operator just wants\nfresh numbers without paying the import cost.\n\nFast (~seconds) — runs synchronously and returns the updated\ndaily summary directly. Wrapped in :func:`run_and_record` so the\noperation lands in ``db.task_history`` alongside the normal\nimport runs.",
        "operationId": "recompute_daily_stats_probes_archive_daily__date__recompute_stats_post",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Recompute Daily Stats Probes Archive Daily  Date  Recompute Stats Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-archive/daily/recompute-stats-range": {
      "post": {
        "tags": [
          "probes",
          "archive",
          "mongo"
        ],
        "summary": "Recompute Daily Stats Range",
        "description": "Rebuild the stats block for every date in a window.\n\nNo RIPE call — reads only ``db.probes_archive`` and rewrites each\ndaily summary's ``stats`` / ``probes_count`` / ``stats_recomputed_at``\nin place. Loops :meth:`ProbesArchive.recompute_stats` across the\nrange; dates with no archive rows or no daily-summary row are\nsurfaced as ``skipped`` entries rather than aborting the run.\n\nSynchronous on purpose — per-date recompute is ~seconds (it's\njust ``$group`` aggregations against an already-indexed\ncollection), and the\n:attr:`ProbesArchive.RECOMPUTE_RANGE_MAX_DAYS` cap keeps the\nworst-case request inside the frontend's long-running HTTP\ntimeout. Operators wanting a wider rebuild chunk the submission.\n\nWrapped in :func:`run_and_record` so the bulk job lands as a\nsingle entry in ``db.task_history`` (one row per range, not one\nper date — the per-date trail lives in ``stats_recomputed_at``\non each daily-summary row).",
        "operationId": "recompute_daily_stats_range_probes_archive_daily_recompute_stats_range_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api__routers__probes_archive__RecomputeStatsRangeSubmit"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Recompute Daily Stats Range Probes Archive Daily Recompute Stats Range Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-archive/daily/recompute-all": {
      "post": {
        "tags": [
          "probes",
          "archive",
          "mongo"
        ],
        "summary": "Recompute All Daily Stats",
        "description": "Unconditionally recompute **every** daily-stats row across the\nfull history — fire-and-forget.\n\nThe \"fix everything\" lever, distinct from the stale-drain: it\nrebuilds *all* days regardless of their schema/freshness\nclassification, so days wrongly stamped ``current`` under an\nearlier/incomplete ``first_seen`` (the cause of a flat ``new_probes``\nhistory after a seed) actually get corrected — something\n``backfill-stale-stats`` and the drain cron can't do, since they only\ntouch days still classified stale.\n\nNo RIPE call (DB-only ``$group`` recompute), idempotent, and empty\ndays seal as they go. A full ~10-year rebuild runs well past the\ngateway timeout, so it's handed to a background task — one\n``recompute_probes_archive_stats_all`` row in ``db.task_history`` —\nand returns immediately. Poll\n``GET /probes-archive/daily/stats-coverage`` (or watch the\nNew-probes graph fill in) for progress. The 15-min drain cron keeps\nit current afterwards.",
        "operationId": "recompute_all_daily_stats_probes_archive_daily_recompute_all_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Recompute All Daily Stats Probes Archive Daily Recompute All Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-archive/daily/seed-first-seen": {
      "post": {
        "tags": [
          "probes",
          "archive",
          "mongo"
        ],
        "summary": "Seed First Seen",
        "description": "One-time backfill of ``db.probes_archive_first_seen`` from the\nfull archive.\n\nRequired after deploy because the daily stats' ``new_probes`` /\n``by_country_new`` now read from this cache instead of the\nfull-collection ``$group`` that was hitting the Mongo socket-\ntimeout cliff. Walks year by year (each ``$group`` bounded to one\nyear's slice) and ``$min``-upserts into the cache — idempotent\nand safe to re-run.\n\nFire-and-forget: a full-archive rebuild scans many years of rows\nand runs well past the gateway timeout (a single full year already\ndoes), so the work is handed to a background task — wrapped in\n:func:`run_and_record` as one ``seed_probes_archive_first_seen``\n(trigger=manual) row — and the request returns ``{\"status\":\n\"started\"}`` immediately. Poll\n``GET /task-history/?task_name=seed_probes_archive_first_seen``\nfor the result counters / completion.\n\n``since`` / ``until`` (``YYYY`` or ``YYYY-MM-DD``) narrow the seed\nto a sub-range; a bare year is widened to that year's full span.\nA malformed bound is rejected synchronously (400) before the job\nis scheduled.",
        "operationId": "seed_first_seen_probes_archive_daily_seed_first_seen_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/SeedFirstSeenSubmit"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Seed First Seen Probes Archive Daily Seed First Seen Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-archive/daily/stats-coverage": {
      "get": {
        "tags": [
          "probes",
          "archive",
          "mongo"
        ],
        "summary": "Daily Stats Coverage",
        "description": "Per-class daily-stats coverage over the retained window.\n\nPure read — one indexed ``date``-range scan, no recompute.\nReturns the :meth:`ProbesArchive.stats_coverage` blob\n(``schema_version`` + ``counts`` of\n``missing``/``stale_schema``/``stale_data``/``current`` +\n``stale_dates``). 400 on a bad / inverted range.",
        "operationId": "daily_stats_coverage_probes_archive_daily_stats_coverage_get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "inclusive start, YYYY-MM-DD",
              "title": "Since"
            },
            "description": "inclusive start, YYYY-MM-DD"
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "inclusive end, YYYY-MM-DD",
              "title": "Until"
            },
            "description": "inclusive end, YYYY-MM-DD"
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Daily Stats Coverage Probes Archive Daily Stats Coverage Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-archive/daily/backfill-stale-stats": {
      "post": {
        "tags": [
          "probes",
          "archive",
          "mongo"
        ],
        "summary": "Backfill Stale Daily Stats",
        "description": "Force an immediate newest-first recompute of stale daily-stats.\n\nThe on-demand burst counterpart to the drain cron — use right\nafter a deliberate ``STATS_SCHEMA_VERSION`` bump to converge now\nrather than waiting for the cron to grind through. DB-only,\nidempotent, bounded (``max_days`` server-clamped). Wrapped in\n:func:`run_and_record` so it lands in ``db.task_history``.",
        "operationId": "backfill_stale_daily_stats_probes_archive_daily_backfill_stale_stats_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/api__routers__probes_archive__BackfillStaleStatsSubmit"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Backfill Stale Daily Stats Probes Archive Daily Backfill Stale Stats Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-archive/daily/backfill": {
      "post": {
        "tags": [
          "probes",
          "archive",
          "mongo"
        ],
        "summary": "Submit Backfill",
        "description": "Queue a date range for serial backfill.\n\nReturns immediately with the list of dates that were queued.\n``status: \"queued\"`` rows are pre-inserted into\n``db.probes_archive_daily`` so the admin dashboard's heatmap\nreflects the submission right away. The in-process worker then\npulls one date at a time and runs ``import_day`` against it; each\nrun audits to ``db.task_history`` with ``trigger: \"backfill\"``.\n\nThe queue lives in process memory — a backend restart drops\npending entries, but the pre-inserted ``queued`` rows survive,\nand re-submitting the same range picks up where the worker left\noff (the dates that already succeeded are filtered out by\n``only_missing=true``).",
        "operationId": "submit_backfill_probes_archive_daily_backfill_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api__routers__probes_archive__BackfillSubmit"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Submit Backfill Probes Archive Daily Backfill Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-archive/daily/backfill/status": {
      "get": {
        "tags": [
          "probes",
          "archive",
          "mongo"
        ],
        "summary": "Get Backfill Status",
        "description": "Worker queue depth, currently-importing date, and liveness.\n\nAll three fields are best-effort snapshots — by the time the\nresponse reaches the client the worker may have advanced. The\ndashboard already polls daily rows for status transitions; this\nendpoint is for the queue-depth badge and the worker-alive\ntripwire that surfaces the recovery button.",
        "operationId": "get_backfill_status_probes_archive_daily_backfill_status_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackfillStatus"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-archive/daily/backfill/recover-stale": {
      "post": {
        "tags": [
          "probes",
          "archive",
          "mongo"
        ],
        "summary": "Recover Stale Backfill",
        "description": "Re-queue any rows stuck in ``running`` / ``queued`` state.\n\nThe in-process worker's queue lives in memory — a backend\nrestart drops it, but the ``queued`` / ``running`` rows it was\ntracking persist in ``db.probes_archive_daily``. The same\nrecovery runs automatically at worker startup; this endpoint\ncovers the rare follow-up case where the worker task died\nsilently while the backend kept running, leaving the queue\nstranded.\n\nSafe to call any time. :meth:`ProbesArchive.import_day` is\nidempotent (per-(probe, day) upserts plus a daily-summary\nrewrite), so re-running over a date that's part-imported\ncompletes it; re-running over a fully-imported date is a no-op\nagainst the per-probe collection and a fresh recompute of the\nstats block.",
        "operationId": "recover_stale_backfill_probes_archive_daily_backfill_recover_stale_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Recover Stale Backfill Probes Archive Daily Backfill Recover Stale Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-archive/series/": {
      "get": {
        "tags": [
          "probes",
          "archive",
          "mongo"
        ],
        "summary": "Get Series",
        "description": "Daily stats blob across a date range, oldest-first.\n\nDrives the operator-facing ``/graphs/probes-archive`` trends\nview. Each entry in ``results`` is one ``probes_archive_daily``\ndoc with its pre-computed ``stats`` block — the trend view's\neight charts (status / capability / ASN-count / new probes /\nanchors / country / hardware-generation / region) all hang off\nthis single fetch.\n\n``include_asn=true`` opts in to the heavy ``stats.by_asn``\ndistribution (tens-of-thousands of entries per row in the worst\ncase); default omits it. The scalar ``stats.asn_count_v4`` /\n``asn_count_v6`` counters are always included regardless.\n\n``include_missing=true`` opts in to the\n``stats.missing_countries`` + ``stats.missing_cities`` coverage\nlists. The cities list is ~80 KB per row at the 500k-population\nthreshold; default omits it to keep the series payload small.\nThe single-day detail route (``/daily/{date}/``) always carries\nboth.\n\nNo auth gate — the data is aggregate population counts over\npublic RIPE info; matches the existing pattern for\n``/graphs/probes/new`` and ``/events/buckets/``.\n\nDeclared **before** ``/{date}/`` further down so the literal\n``series`` segment can't be mis-routed to the per-day reader.",
        "operationId": "get_series_probes_archive_series__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "include_asn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Asn"
            }
          },
          {
            "name": "include_missing",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Missing"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Series Probes Archive Series  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-archive/deployment-series/": {
      "get": {
        "tags": [
          "probes",
          "archive",
          "mongo"
        ],
        "summary": "Get Deployment Series",
        "description": "Probe count over time — multi-select filters + optional split.\n\nBacks ``/graphs/probes-archive/deployment``. Auto-routes between\nthe daily-stats fast path (a multi-year fleet line is cheap) and a\nbounded raw-aggregation fallback for filter combos the stored\ncrosstabs can't answer (``source`` says which). Gap days\n(missing / non-success import) come back as ``null`` so a bad\nimport never reads as a fleet collapse.\n\nNo auth gate — aggregate counts over public RIPE info, same as\n``/series/``. Declared before ``/{date}/`` so the literal segment\ncan't be mis-routed. 400 on a bad / inverted / over-cap range or\nan unsupported metric/dimension combo.",
        "operationId": "get_deployment_series_probes_archive_deployment_series__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Region"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "asn",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Asn"
            }
          },
          {
            "name": "split",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "none",
              "title": "Split"
            }
          },
          {
            "name": "metric",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count",
              "title": "Metric"
            }
          },
          {
            "name": "smooth",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Smooth"
            }
          },
          {
            "name": "top_n",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Top N"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Deployment Series Probes Archive Deployment Series  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-archive/deployment-filters/": {
      "get": {
        "tags": [
          "probes",
          "archive",
          "mongo"
        ],
        "summary": "Get Deployment Filters",
        "description": "Selector option lists for the deployment view (countries /\nregions / top ASNs from the latest daily row + the fixed RIPE\nstatus set). Single-doc read — instant, no scan. No auth gate.",
        "operationId": "get_deployment_filters_probes_archive_deployment_filters__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Get Deployment Filters Probes Archive Deployment Filters  Get"
                }
              }
            }
          }
        }
      }
    },
    "/probes-archive/deployment-movers/": {
      "get": {
        "tags": [
          "probes",
          "archive",
          "mongo"
        ],
        "summary": "Get Deployment Movers",
        "description": "Biggest growers / shrinkers for a dimension over the window\n(first-vs-last non-gap day delta from the stored marginals). Pure\ndaily-stats read, no auth gate. 400 on a bad range / dimension.",
        "operationId": "get_deployment_movers_probes_archive_deployment_movers__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "dimension",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "country",
              "title": "Dimension"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 15,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Deployment Movers Probes Archive Deployment Movers  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-archive/overview-stats/": {
      "get": {
        "tags": [
          "probes",
          "archive",
          "mongo"
        ],
        "summary": "Get Overview Stats",
        "description": "Whole-collection top-line for the admin panel — date range,\ncoverage, total rows, storage size, latest import, probes-per-day\naggregates. See :meth:`ProbesArchive.get_overview_stats`.\n\nDeclared **before** ``/{date}/`` below so the literal\n``overview-stats`` segment doesn't get matched as a date string\nand routed to the per-day reader. FastAPI tries routes in\ndeclaration order — keep this above the date-catch.",
        "operationId": "get_overview_stats_probes_archive_overview_stats__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Overview Stats Probes Archive Overview Stats  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-archive/{date}/": {
      "get": {
        "tags": [
          "probes",
          "archive",
          "mongo"
        ],
        "summary": "Get For Date",
        "description": "Per-day list of every probe row.\n\nCapped server-side — full daily list is ~50k rows; ``limit``\nclamps to 5000. Use ``skip`` for pagination if you really need\neveryone.",
        "operationId": "get_for_date_probes_archive__date___get",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1000,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response Get For Date Probes Archive  Date   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-archive/probes/{probe_id}/": {
      "get": {
        "tags": [
          "probes",
          "archive",
          "mongo"
        ],
        "summary": "Get For Probe",
        "description": "Per-probe history, oldest-first.\n\nOptional ``since`` / ``until`` (``YYYY-MM-DD``) bound the date\nrange; without them the full history is returned.",
        "operationId": "get_for_probe_probes_archive_probes__probe_id___get",
        "parameters": [
          {
            "name": "probe_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Probe Id"
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response Get For Probe Probes Archive Probes  Probe Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-health/stats/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Get Anchors Health Stats",
        "description": "Top-of-page summary: counts + per-issue breakdown + last\nsnapshot timestamp. Drives the dashboard's summary tile row.",
        "operationId": "get_anchors_health_stats_anchors_health_stats__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Anchors Health Stats Anchors Health Stats  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-health/events/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "List Anchor Health Events",
        "description": "Paginated event feed (newest first). All filters AND-compose.\n\nUsed by the dashboard's \"Recent events\" card and the per-anchor\ntimeline panel on the AnchorDetailView Health tab.",
        "operationId": "list_anchor_health_events_anchors_health_events__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "anchor_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anchor Id"
            }
          },
          {
            "name": "issue_key",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Issue Key"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "opened",
                    "closed"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter on event state.",
              "title": "State"
            },
            "description": "Filter on event state."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Anchor Health Events Anchors Health Events  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-health/snapshot/run": {
      "post": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Run Snapshot",
        "description": "Cookie-auth manual snapshot trigger.\n\nSame operation as the api-key-gated\n``POST /atlas/anchors-health/snapshot/`` in ``api/main.py`` —\nduplicated here so the dashboard \"Run snapshot now\" button can\nfire it via the operator's session cookie without needing an\nAPI key. Wrapped in :func:`run_and_record` so the run lands in\n``db.task_history`` alongside the scheduled ones.",
        "operationId": "run_snapshot_anchors_health_snapshot_run_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Run Snapshot Anchors Health Snapshot Run Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-health/dns/stats/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Get Anchors Dns Stats",
        "description": "Summary blob for the admin DNS section: per-overall-verdict\ncounts (ok / mismatch / error), total, TTL + drain cap, and the\nnewest / oldest stored-check timestamps (drain freshness).",
        "operationId": "get_anchors_dns_stats_anchors_health_dns_stats__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Anchors Dns Stats Anchors Health Dns Stats  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-health/dns/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "List Anchors Dns",
        "description": "Paginated stored DNS results, newest-checked first. Optional\n``?overall=mismatch`` narrows to the failing anchors (backs the\nadmin \"show mismatches\" table).",
        "operationId": "list_anchors_dns_anchors_health_dns__get",
        "parameters": [
          {
            "name": "overall",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "ok",
                    "mismatch",
                    "error"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter on the overall DNS verdict.",
              "title": "Overall"
            },
            "description": "Filter on the overall DNS verdict."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Anchors Dns Anchors Health Dns  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-health/dns/recheck-stale/run": {
      "post": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Recheck Stale Dns",
        "description": "Cookie-auth bulk \"re-check stale now\" burst — re-resolves every\nanchor whose stored result is missing/older than the TTL\n(oldest-first), server-clamped to ``MANUAL_MAX``. Same op as the\napi-key ``POST /atlas/anchors-dns/snapshot/``; duplicated here so\nthe admin button works on the session cookie. Wrapped in\n:func:`run_and_record` so the run lands in ``db.task_history``\nalongside the scheduled drain (``trigger=\"manual\"``).",
        "operationId": "recheck_stale_dns_anchors_health_dns_recheck_stale_run_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/api__routers__anchors_health__RecheckStaleRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Payload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Recheck Stale Dns Anchors Health Dns Recheck Stale Run Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-health/dns/{anchor_id}/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Get Anchor Dns",
        "description": "Stored DNS-resolution result for one anchor. Powers the\nAnchorDetailView Health-tab \"DNS resolution\" panel. 404 when the\nanchor hasn't been DNS-checked yet (the UI then shows a \"not\nchecked yet\" placeholder + offers the re-lookup button).",
        "operationId": "get_anchor_dns_anchors_health_dns__anchor_id___get",
        "parameters": [
          {
            "name": "anchor_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Anchor Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Anchor Dns Anchors Health Dns  Anchor Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-health/dns/{anchor_id}/recheck/": {
      "post": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Recheck Anchor Dns",
        "description": "Resolve + persist one anchor's FQDN right now (the per-anchor\n\"Re-lookup DNS now\" button), returning the refreshed stored doc —\nsame shape as ``GET /dns/{anchor_id}/``. 404 when there's no such\nanchor in ``db.anchors`` (nothing to resolve). One live resolve\n(A + AAAA); off-loaded to a worker thread so the slow network call\nnever blocks the event loop.",
        "operationId": "recheck_anchor_dns_anchors_health_dns__anchor_id__recheck__post",
        "parameters": [
          {
            "name": "anchor_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Anchor Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Recheck Anchor Dns Anchors Health Dns  Anchor Id  Recheck  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-health/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "List Problem Anchors",
        "description": "Paginated list of active anchors currently carrying issues.\n\nOptional ``?issue=<key>`` narrows to anchors with that specific\nissue. Joined hostname / country / probe description is inlined\non each result row so the dashboard table doesn't need a\nper-row fetch.",
        "operationId": "list_problem_anchors_anchors_health__get",
        "parameters": [
          {
            "name": "issue",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Issue"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "recent",
                "oldest"
              ],
              "type": "string",
              "description": "recent = most-recently-changed first; oldest = longest-stable first",
              "default": "recent",
              "title": "Sort"
            },
            "description": "recent = most-recently-changed first; oldest = longest-stable first"
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Problem Anchors Anchors Health  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-health/{anchor_id}/explain/{issue_key}": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Get Issue Explanation",
        "description": "Cached guidance for this anchor's issue, or ``explanation: null``.\n\nA pure read — it never generates, so a dashboard render can't trigger\nan upstream call. A miss simply means the UI offers Generate.",
        "operationId": "get_issue_explanation_anchors_health__anchor_id__explain__issue_key__get",
        "parameters": [
          {
            "name": "anchor_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Anchor Id"
            }
          },
          {
            "name": "issue_key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Issue Key"
            }
          },
          {
            "name": "model",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Model"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Issue Explanation Anchors Health  Anchor Id  Explain  Issue Key  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Generate Issue Explanation",
        "description": "Generate guidance for this issue *class* (fire-and-forget).\n\nBackgrounded; poll the GET. Because the cache key is the context\nshape, this usually benefits every other anchor in the same state\ntoo — and is a no-op cache hit if one of them already paid for it.",
        "operationId": "generate_issue_explanation_anchors_health__anchor_id__explain__issue_key__post",
        "parameters": [
          {
            "name": "anchor_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Anchor Id"
            }
          },
          {
            "name": "issue_key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Issue Key"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExplainBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Generate Issue Explanation Anchors Health  Anchor Id  Explain  Issue Key  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-health/admin/stats/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Get Admin Stats",
        "description": "Combined run-stats + collection-size blob for the admin panel.\n\nOne call returns everything the top-of-page tiles need: task_history\naggregations (totals, last run, success rate, durations) plus the\ncurrent sizes of both health collections. Lets the admin view\nrender in one round-trip.\n\nBoth sub-queries run in parallel worker threads via\n:func:`asyncio.to_thread` so the FastAPI event loop stays\nresponsive and a slow ``task_history`` aggregation can't stall\nthe smaller collection-stats counts behind it. Without the\nthreading wrap the route would block on a string of synchronous\nPyMongo round-trips and could overrun the 15 s client timeout\non cold/large databases.",
        "operationId": "get_admin_stats_anchors_health_admin_stats__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Admin Stats Anchors Health Admin Stats  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-health/admin/runs/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "List Admin Runs",
        "description": "Recent runs of the snapshot task with their full counters blob.\n\nDrives the admin panel's \"Recent runs\" table. Limit capped server-\nside at 200 — bigger pulls should go through AdminTaskHistoryView\nwhich paginates properly.",
        "operationId": "list_admin_runs_anchors_health_admin_runs__get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Admin Runs Anchors Health Admin Runs  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-health/admin/clear/": {
      "post": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Clear Collections",
        "description": "Wipe ``db.anchors_health`` + ``db.anchors_health_events``.\n\nDestructive — the next snapshot tick repopulates the state\ncollection from scratch (and emits a fresh ``opened`` event for\nevery currently-firing issue, since the diff path sees no prior\nstate). ``db.task_history`` is intentionally untouched; the\naudit trail of past runs survives a clear.\n\nRequires ``confirm: true`` in the body so a stale fetch or a\nmisclick doesn't take out the snapshot history.",
        "operationId": "clear_collections_anchors_health_admin_clear__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api__routers__anchors_health__ClearCollectionsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Clear Collections Anchors Health Admin Clear  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-health/{anchor_id}/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Get Anchor Health",
        "description": "Current state + recent events for one anchor.\n\nPowers the AnchorDetailView \"Health\" tab. Returns 404 when the\nanchor has no health record yet (never been snapshotted — e.g.\na brand-new anchor before the first cron tick after its\ncreation).",
        "operationId": "get_anchor_health_anchors_health__anchor_id___get",
        "parameters": [
          {
            "name": "anchor_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Anchor Id"
            }
          },
          {
            "name": "events_limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Events Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Anchor Health Anchors Health  Anchor Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-health/{anchor_id}/reverify-capabilities/": {
      "post": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Reverify Capabilities",
        "description": "Recompute + persist the ``missing_required_system_tags``\ncapability verification for one anchor (both directions), so an\noperator needn't wait for the next scheduled snapshot. Returns\nthe refreshed Health-tab payload (same shape as\n``GET /{anchor_id}/``).\n\n404 when the anchor has no health record, no such open issue, no\nverifiable works tag in ``missing``, or its anchor doc is gone —\nin every one of those cases there is nothing to verify. DB-only;\nno RIPE.",
        "operationId": "reverify_capabilities_anchors_health__anchor_id__reverify_capabilities__post",
        "parameters": [
          {
            "name": "anchor_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Anchor Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Reverify Capabilities Anchors Health  Anchor Id  Reverify Capabilities  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-health/{anchor_id}/fix-duplicate-measurements/": {
      "post": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Fix Duplicate Measurements",
        "description": "Stop the redundant measurements behind an anchor's\n``duplicate_anchor_measurement`` issue.\n\nAdmin-gated — it presents a privileged DELETE key to RIPE — and\naudited via :func:`run_and_record` so the run lands in\n``db.task_history`` alongside the scheduled jobs. The stop list\nis re-derived **server-side** from the persisted health state\n(the client can't pick which measurements get stopped); for every\nduplicated cell the lowest ``measurement_id`` is kept and the rest\nstopped, best-effort per id. The next snapshot tick re-evaluates\nand closes the issue. Returns the\n:meth:`AnchoringMutations.fix_duplicate_anchor_measurements`\nsummary.\n\n400 when there is no state doc or no open duplicate issue —\nnothing to fix.",
        "operationId": "fix_duplicate_measurements_anchors_health__anchor_id__fix_duplicate_measurements__post",
        "parameters": [
          {
            "name": "anchor_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Anchor Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Fix Duplicate Measurements Anchors Health  Anchor Id  Fix Duplicate Measurements  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-health/stats/": {
      "get": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "Get Probes Health Stats",
        "description": "Top-of-page summary: counts + per-issue + per-severity\nbreakdown + last snapshot timestamp. Drives the dashboard's\nsummary tile row.",
        "operationId": "get_probes_health_stats_probes_health_stats__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Probes Health Stats Probes Health Stats  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-health/series/": {
      "get": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "Get Probes Health Series",
        "description": "Hourly fleet-health snapshots over an inclusive ``YYYY-MM-DD``\nwindow (oldest-first) — drives the probe-health trends view. Each\npoint carries severity / issue counts + active + connected totals\nfor that UTC hour.",
        "operationId": "get_probes_health_series_probes_health_series__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Until"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Probes Health Series Probes Health Series  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-health/events/": {
      "get": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "List Probe Health Events",
        "description": "Paginated event feed (newest first). All filters AND-compose.",
        "operationId": "list_probe_health_events_probes_health_events__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "probe_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Probe Id"
            }
          },
          {
            "name": "issue_key",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Issue Key"
            }
          },
          {
            "name": "severity",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "info",
                    "warning",
                    "critical"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter on issue severity.",
              "title": "Severity"
            },
            "description": "Filter on issue severity."
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "opened",
                    "closed"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter on event state.",
              "title": "State"
            },
            "description": "Filter on event state."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Probe Health Events Probes Health Events  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-health/connectivity-debug": {
      "get": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "Connectivity Debug",
        "description": "One-shot connectivity-pass diagnostic. Runs the real\n``classify_fleet`` pass live (fast — no full snapshot) and returns\nevent counts, what it classified, the per-flag breakdown, samples,\nand any error. Use this to see *why* the connectivity_* issues are\nor aren't firing without digging through task_history.",
        "operationId": "connectivity_debug_probes_health_connectivity_debug_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Connectivity Debug Probes Health Connectivity Debug Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-health/snapshot/run": {
      "post": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "Run Snapshot",
        "description": "Cookie-auth manual snapshot trigger. Fire-and-forget: a full-fleet\nsnapshot (stream ~all recent connection events + rule-eval + per-probe\nupserts across the connected fleet) routinely runs longer than the\ngateway timeout, so running it inline returned a 504 even though the\nwork completed. We hand it to a background task and return immediately;\nthe dashboard polls ``/stats/`` for the new ``last_snapshot_ts`` and\nrefreshes when it lands. Still wrapped in :func:`run_and_record` so it\nshows up in ``db.task_history`` (with the connectivity diagnostics)\nalongside the scheduled runs.",
        "operationId": "run_snapshot_probes_health_snapshot_run_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Run Snapshot Probes Health Snapshot Run Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-health/": {
      "get": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "List Problem Probes",
        "description": "Paginated list of active probes currently carrying issues.\n``?issue=<key>`` / ``?severity=<tier>`` narrow it; joined\ndescription / country / status name is inlined per row so the\ntable needs no per-row fetch.",
        "operationId": "list_problem_probes_probes_health__get",
        "parameters": [
          {
            "name": "issue",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Issue"
            }
          },
          {
            "name": "severity",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "info",
                    "warning",
                    "critical"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter on issue severity.",
              "title": "Severity"
            },
            "description": "Filter on issue severity."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "recent",
                "oldest"
              ],
              "type": "string",
              "description": "recent = most-recently-changed first; oldest = longest-stable first",
              "default": "recent",
              "title": "Sort"
            },
            "description": "recent = most-recently-changed first; oldest = longest-stable first"
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Problem Probes Probes Health  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-health/admin/stats/": {
      "get": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "Get Admin Stats",
        "description": "Combined run-stats + collection-size blob for the admin panel\n(both sub-queries in parallel worker threads).",
        "operationId": "get_admin_stats_probes_health_admin_stats__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Admin Stats Probes Health Admin Stats  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-health/admin/runs/": {
      "get": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "List Admin Runs",
        "description": "Recent runs of the snapshot task with their full counters\nblob. Limit capped server-side at 200.",
        "operationId": "list_admin_runs_probes_health_admin_runs__get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Admin Runs Probes Health Admin Runs  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-health/admin/clear/": {
      "post": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "Clear Collections",
        "description": "Wipe ``db.probes_health`` + ``db.probes_health_events``.\nDestructive — the next tick repopulates from scratch (and the\nfirst such tick is a whole-fleet bootstrap). ``task_history``\nuntouched. Requires ``confirm: true``.",
        "operationId": "clear_collections_probes_health_admin_clear__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api__routers__probes_health__ClearCollectionsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Clear Collections Probes Health Admin Clear  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-health/measurements/stats/": {
      "get": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "Get Probe Measurement Health Stats",
        "description": "Summary blob for the admin section: per-verdict counts, total,\nTTL + drain cap, and newest/oldest stored-check timestamps.",
        "operationId": "get_probe_measurement_health_stats_probes_health_measurements_stats__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Probe Measurement Health Stats Probes Health Measurements Stats  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-health/measurements/": {
      "get": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "List Probe Measurement Health",
        "description": "Paginated stored measurement-health results, newest-checked\nfirst. Optional ``?verdict=critical`` narrows to the failing\nprobes.",
        "operationId": "list_probe_measurement_health_probes_health_measurements__get",
        "parameters": [
          {
            "name": "verdict",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "ok",
                    "info",
                    "warning",
                    "critical",
                    "unknown",
                    "error"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter on the stored verdict.",
              "title": "Verdict"
            },
            "description": "Filter on the stored verdict."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Probe Measurement Health Probes Health Measurements  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-health/measurements/recheck-stale/run": {
      "post": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "Recheck Stale Probe Measurement Health",
        "description": "Cookie-auth bulk \"re-check stale now\" burst — re-checks every\nconnected works-tagged probe whose stored result is missing/older\nthan the TTL (oldest-first), server-clamped to ``MANUAL_MAX``.\nSame op as the api-key ``POST\n/atlas/probe-measurement-health/snapshot/``; duplicated so the\nadmin button works on the session cookie. ``run_and_record``-\nwrapped so it lands in ``db.task_history`` (``trigger=\"manual\"``).",
        "operationId": "recheck_stale_probe_measurement_health_probes_health_measurements_recheck_stale_run_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/api__routers__probes_health__RecheckStaleRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Payload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Recheck Stale Probe Measurement Health Probes Health Measurements Recheck Stale Run Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-health/measurements/{probe_id}/": {
      "get": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "Get Probe Measurement Health",
        "description": "Stored measurement-health result for one probe. Powers the\nProbeLookupView Health-tab \"Measurement results\" panel. Read access\nis any logged-in user (the Health tab is logged-in-gated); the\nre-check write below stays staff-only. 404 when\nthe probe hasn't been checked yet (the UI then shows a \"not\nchecked yet\" placeholder + offers the re-check button).",
        "operationId": "get_probe_measurement_health_probes_health_measurements__probe_id___get",
        "parameters": [
          {
            "name": "probe_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Probe Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Probe Measurement Health Probes Health Measurements  Probe Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-health/measurements/{probe_id}/recheck/": {
      "post": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "Recheck Probe Measurement Health",
        "description": "Re-check + persist one probe right now (the per-probe \"Re-check\nnow\" button), returning the refreshed stored doc — same shape as\n``GET /measurements/{probe_id}/``. 404 when there's no such probe\nin ``db.probes``. Off-loaded to a worker thread so the RIPE calls\nnever block the event loop.",
        "operationId": "recheck_probe_measurement_health_probes_health_measurements__probe_id__recheck__post",
        "parameters": [
          {
            "name": "probe_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Probe Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Recheck Probe Measurement Health Probes Health Measurements  Probe Id  Recheck  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-health/{probe_id}/": {
      "get": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "Get Probe Health",
        "description": "Current state + recent events for one probe. Powers the\nProbeLookupView \"Health\" surface — read access is any logged-in\nuser (the tab is logged-in-gated). 404 when the probe has no health\nrecord yet (never snapshotted — e.g. a probe that's never been\nconnected and has had no issue, before any bootstrap).",
        "operationId": "get_probe_health_probes_health__probe_id___get",
        "parameters": [
          {
            "name": "probe_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Probe Id"
            }
          },
          {
            "name": "events_limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Events Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Probe Health Probes Health  Probe Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-result-health/stats/": {
      "get": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "Get Result Health Stats",
        "description": "Dashboard tiles: total scored, total flagged, grade breakdown,\nper-flag counts, last-snapshot timestamp.",
        "operationId": "get_result_health_stats_probes_result_health_stats__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Result Health Stats Probes Result Health Stats  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-result-health/series/": {
      "get": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "Get Result Health Series",
        "description": "Hourly fleet aggregates over an inclusive ``YYYY-MM-DD`` window\n(oldest-first) — drives the trend chart. Each point carries grade +\nper-flag counts + score-bucket distribution for that UTC hour.",
        "operationId": "get_result_health_series_probes_result_health_series__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Until"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Result Health Series Probes Result Health Series  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-result-health/events/": {
      "get": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "List Result Health Events",
        "description": "Flag-transition feed (newest first). A row exists only where a\nprobe's flag flipped on or off, so this is the sparse change log.",
        "operationId": "list_result_health_events_probes_result_health_events__get",
        "parameters": [
          {
            "name": "probe_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Probe Id"
            }
          },
          {
            "name": "flag",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Flag"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "on",
                    "off"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter on flag transition direction.",
              "title": "State"
            },
            "description": "Filter on flag transition direction."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Result Health Events Probes Result Health Events  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-result-health/snapshot/run": {
      "post": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "Run Snapshot",
        "description": "Cookie-auth manual snapshot trigger. Fire-and-forget — the pass\nscans every well-known channel's cached results across the connected\nfleet and can run past the gateway timeout, so it's handed to a\nbackground task (recorded in ``db.task_history``). The dashboard polls\n``/stats/`` for the new ``last_snapshot_ts`` and refreshes.",
        "operationId": "run_snapshot_probes_result_health_snapshot_run_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Run Snapshot Probes Result Health Snapshot Run Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-result-health/": {
      "get": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "List Problem Probes",
        "description": "Worst probes first (score ascending). ``flag`` / ``country`` filter\nAND-compose; ``only_flagged`` (default) hides healthy probes.",
        "operationId": "list_problem_probes_probes_result_health__get",
        "parameters": [
          {
            "name": "flag",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Flag"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "only_flagged",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true,
              "title": "Only Flagged"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Problem Probes Probes Result Health  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/probes-result-health/{probe_id}/": {
      "get": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "Get Probe Result Health",
        "description": "One probe's current verdict + recent flag events.",
        "operationId": "get_probe_result_health_probes_result_health__probe_id___get",
        "parameters": [
          {
            "name": "probe_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Probe Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Probe Result Health Probes Result Health  Probe Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-health/matrix/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Get Mesh Coverage Matrix",
        "description": "N×N coverage matrix for the operator-facing mesh-matrix view.\n\nWithout ``?at=``: returns the most recent snapshot.\nWith ``?at=<unix-seconds>``: returns the snapshot with the\nhighest ``snapshot_ts`` that's ``<= at``. Operator-friendly\n\"show me state at this point in time\" semantics — daily-cadence\nsnapshots always resolve to something visible even when the\nrequested instant doesn't match a snapshot exactly.\n\nReturns 404 when no snapshot has produced a matrix yet, or\nwhen ``at`` is before the first available snapshot.",
        "operationId": "get_mesh_coverage_matrix_anchors_mesh_health_matrix__get",
        "parameters": [
          {
            "name": "at",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "At"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Mesh Coverage Matrix Anchors Mesh Health Matrix  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-health/matrix/timestamps/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "List Mesh Matrix Timestamps",
        "description": "List every available matrix-snapshot timestamp, newest-first.\n\nDrives the time picker on the matrix view. Bounded by the\nserver-side retention window (~90 entries at daily cadence).",
        "operationId": "list_mesh_matrix_timestamps_anchors_mesh_health_matrix_timestamps__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Mesh Matrix Timestamps Anchors Mesh Health Matrix Timestamps  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-health/history/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "List Mesh Health History",
        "description": "Per-snapshot aggregate metrics — drives the coverage-trend\nchart on the mesh-health dashboard.\n\nEach row carries headline counts (active / connected / eligible\n/ with-issues / open-issues) plus coverage roll-ups\n(cells_expected / cells_covered / fully_covered_pairs /\npartial_pairs / missing_pairs / coverage_pct). ``since`` /\n``until`` clamp the window; ``limit`` caps response size.",
        "operationId": "list_mesh_health_history_anchors_mesh_health_history__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 90,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Mesh Health History Anchors Mesh Health History  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-health/stats/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Get Anchors Mesh Health Stats",
        "description": "Top-of-page summary: counts + per-issue breakdown.\n\nDrives the mesh-health dashboard's summary tile row. The shape\nmirrors the regular anchor-health stats endpoint, with two\n``per_issue_counts`` keys (``mesh_inbound_coverage_gap`` and\n``mesh_outbound_coverage_gap``) zero-filled when no anchors\ncarry the respective issue.",
        "operationId": "get_anchors_mesh_health_stats_anchors_mesh_health_stats__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Anchors Mesh Health Stats Anchors Mesh Health Stats  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-health/events/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "List Anchor Mesh Health Events",
        "description": "Paginated event feed (newest first). All filters AND-compose.\n\nUsed by the dashboard's \"Recent events\" card and the per-anchor\nmesh timeline on AnchorDetailView. ``issue_key`` is validated\nagainst :data:`MESH_ISSUE_RULES` so a typo returns 400 instead\nof an empty list.",
        "operationId": "list_anchor_mesh_health_events_anchors_mesh_health_events__get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "name": "anchor_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anchor Id"
            }
          },
          {
            "name": "issue_key",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Issue Key"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "opened",
                    "closed"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter on event state.",
              "title": "State"
            },
            "description": "Filter on event state."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Anchor Mesh Health Events Anchors Mesh Health Events  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-health/snapshot/run": {
      "post": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Run Snapshot",
        "description": "Cookie-auth manual snapshot trigger.\n\nSame operation as the api-key-gated\n``POST /atlas/anchors-mesh-health/snapshot/`` in ``api/main.py``\n— duplicated here so the dashboard \"Run snapshot now\" button\ncan fire it via the operator's session cookie without needing\nan API key. Wrapped in :func:`run_and_record` so the run lands\nin ``db.task_history`` alongside the scheduled ones, tagged\nwith ``trigger=\"manual\"``.\n\nSynchronous from the HTTP perspective — the pipeline is pure\nset-math against pre-loaded Mongo data (no upstream RIPE\ncalls), completes in seconds, no need for fire-and-forget.",
        "operationId": "run_snapshot_anchors_mesh_health_snapshot_run_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Run Snapshot Anchors Mesh Health Snapshot Run Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-health/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "List Problem Anchors",
        "description": "Paginated list of active anchors currently carrying mesh\nissues.\n\nOptional ``?issue=<key>`` narrows to anchors carrying that\nspecific issue (one of the two mesh rules).",
        "operationId": "list_problem_anchors_anchors_mesh_health__get",
        "parameters": [
          {
            "name": "issue",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Issue"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "recent",
                "oldest"
              ],
              "type": "string",
              "description": "recent = most-recently-changed first; oldest = longest-stable first",
              "default": "recent",
              "title": "Sort"
            },
            "description": "recent = most-recently-changed first; oldest = longest-stable first"
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Problem Anchors Anchors Mesh Health  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-health/admin/stats/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Get Admin Stats",
        "description": "Combined run-stats + collection-size blob for the admin panel.\n\nOne call returns everything the top-of-page tiles need:\n``task_history`` aggregations (totals, last run, success rate,\ndurations) plus the current sizes of both mesh-health\ncollections. Same response shape as the regular anchors-health\nadmin endpoint so the frontend can share a component.\n\nBoth sub-queries run in parallel worker threads via\n:func:`asyncio.to_thread` so the FastAPI event loop stays\nresponsive and a slow ``task_history`` aggregation can't stall\nthe smaller collection-stats counts behind it. Without the\nthreading wrap the route would block on a string of synchronous\nPyMongo round-trips and routinely overrun the 15 s client\ntimeout on cold/large databases.",
        "operationId": "get_admin_stats_anchors_mesh_health_admin_stats__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Admin Stats Anchors Mesh Health Admin Stats  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-health/admin/runs/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "List Admin Runs",
        "description": "Recent runs of the mesh-health snapshot task with their full\ncounters blob. Drives the admin panel's \"Recent runs\" table.",
        "operationId": "list_admin_runs_anchors_mesh_health_admin_runs__get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Admin Runs Anchors Mesh Health Admin Runs  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-health/admin/clear/": {
      "post": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Clear Collections",
        "description": "Wipe ``db.anchors_mesh_health`` +\n``db.anchors_mesh_health_events``.\n\nDestructive — the next snapshot tick repopulates the state\ncollection from scratch (and emits a fresh ``opened`` event for\nevery currently-firing issue, since the diff path sees no prior\nstate). ``db.task_history`` is intentionally untouched.\n\nRequires ``confirm: true`` in the body so a stale fetch or a\nmisclick doesn't take out the mesh-snapshot history.",
        "operationId": "clear_collections_anchors_mesh_health_admin_clear__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api__routers__anchors_mesh_health__ClearCollectionsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Clear Collections Anchors Mesh Health Admin Clear  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-health/quality/stats/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Get Mesh Quality Stats",
        "description": "Summary blob: per-signal counts + freshness for the mesh-quality\nsection (link-unreachable / v6-broken / geo-impossible / NAT /\nregressions, plus link & watchlist totals).",
        "operationId": "get_mesh_quality_stats_anchors_mesh_health_quality_stats__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Mesh Quality Stats Anchors Mesh Health Quality Stats  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-health/quality/matrix/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Get Mesh Quality Matrix",
        "description": "Directed link facts (RTT / loss / reachability per\n``src→dst,af``) for the quality heatmap layer on the mesh-matrix\nview. Server-capped.",
        "operationId": "get_mesh_quality_matrix_anchors_mesh_health_quality_matrix__get",
        "parameters": [
          {
            "name": "af",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    4,
                    6
                  ],
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Restrict to one address family.",
              "title": "Af"
            },
            "description": "Restrict to one address family."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 5000,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Mesh Quality Matrix Anchors Mesh Health Quality Matrix  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-health/quality/derive/run": {
      "post": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Run Mesh Quality Derive",
        "description": "Cookie-auth manual re-derive. Same op as the api-key\n``POST /atlas/mesh-quality/derive/`` — duplicated so the dashboard\nbutton works on the session cookie. Pure DB; idempotent.\n``run_and_record``-wrapped so it lands in ``db.task_history``.",
        "operationId": "run_mesh_quality_derive_anchors_mesh_health_quality_derive_run_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Run Mesh Quality Derive Anchors Mesh Health Quality Derive Run Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-health/quality/admin/runs/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "List Mesh Quality Runs",
        "description": "Recent ``derive_mesh_quality`` runs from ``db.task_history``.",
        "operationId": "list_mesh_quality_runs_anchors_mesh_health_quality_admin_runs__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Mesh Quality Runs Anchors Mesh Health Quality Admin Runs  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-health/quality/admin/clear/": {
      "post": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Clear Mesh Quality",
        "description": "Wipe the five ``mesh_*`` derived collections. Destructive — the\nnext derive rebuilds the snapshot from scratch; per-anchor +\nwatchlist *history* is lost. ``task_history`` untouched. Requires\n``confirm: true``.",
        "operationId": "clear_mesh_quality_anchors_mesh_health_quality_admin_clear__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api__routers__anchors_mesh_health__ClearCollectionsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Clear Mesh Quality Anchors Mesh Health Quality Admin Clear  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-health/quality/{anchor_id}/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Get Anchor Mesh Quality",
        "description": "Per-anchor mesh-quality rollup (inbound/outbound reach+latency\nper AF, v4/v6 parity, asymmetry, NAT/geo/staleness flags,\nregression/path/flap verdicts). Powers the AnchorDetailView\n\"Mesh quality\" panel. 404 when the anchor hasn't been derived yet\n(e.g. before the first derive, or no mesh links).",
        "operationId": "get_anchor_mesh_quality_anchors_mesh_health_quality__anchor_id___get",
        "parameters": [
          {
            "name": "anchor_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Anchor Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Anchor Mesh Quality Anchors Mesh Health Quality  Anchor Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-health/{anchor_id}/": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Get Anchor Mesh Health",
        "description": "Current mesh-health state + recent events for one anchor.\n\nPowers the AnchorDetailView \"Mesh health\" card. Returns 404\nwhen the anchor has no mesh-health record yet (never been\nsnapshotted — e.g. a brand-new anchor before the first cron\ntick after its creation).",
        "operationId": "get_anchor_mesh_health_anchors_mesh_health__anchor_id___get",
        "parameters": [
          {
            "name": "anchor_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Anchor Id"
            }
          },
          {
            "name": "events_limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Events Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Anchor Mesh Health Anchors Mesh Health  Anchor Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-topology/countries": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "List Topology Countries",
        "description": "Countries that carry at least one snapshot, with their\nnewest-date + a summary cell-tally per country+AF. Drives the\ncountry picker on the public topology view.",
        "operationId": "list_topology_countries_anchors_mesh_topology_countries_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Topology Countries Anchors Mesh Topology Countries Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-topology/{cc}/{af}/latest": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Get Topology Latest",
        "description": "Newest snapshot for ``cc``/``af``. 404 when no snapshot has\never been built for this country+AF (typically: below the\n``MIN_CONNECTED_ANCHORS`` threshold, or first build still\npending the next cron tick).",
        "operationId": "get_topology_latest_anchors_mesh_topology__cc___af__latest_get",
        "parameters": [
          {
            "name": "cc",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cc"
            }
          },
          {
            "name": "af",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Af"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Topology Latest Anchors Mesh Topology  Cc   Af  Latest Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-topology/{cc}/{af}/dates": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "List Topology Dates",
        "description": "Newest-first list of dates with a snapshot — drives the date\npicker on the public topology view.",
        "operationId": "list_topology_dates_anchors_mesh_topology__cc___af__dates_get",
        "parameters": [
          {
            "name": "cc",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cc"
            }
          },
          {
            "name": "af",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Af"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 365,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Topology Dates Anchors Mesh Topology  Cc   Af  Dates Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-topology/{cc}/{af}/{date}": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Get Topology Snapshot",
        "description": "Specific historical snapshot by natural key. 404 when the\nrequested date has no snapshot.",
        "operationId": "get_topology_snapshot_anchors_mesh_topology__cc___af___date__get",
        "parameters": [
          {
            "name": "cc",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cc"
            }
          },
          {
            "name": "af",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Af"
            }
          },
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Topology Snapshot Anchors Mesh Topology  Cc   Af   Date  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchors-mesh-topology/{cc}/{af}/{date}/cell/{src_id}/{dst_id}/traceroute": {
      "get": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Get Topology Cell Traceroute",
        "description": "Raw RIPE traceroute envelope for one matrix cell — the source\nof truth behind the derived per-cell metrics. Drives the public\nUI's click-to-pin :component:`TracerouteResult` panel under the\nmatrix.\n\nThe body shape::\n\n    {\n      \"envelope\":   <verbatim RIPE /latest/ row — RipeLatestResult>,\n      \"src_msm\":    <int>,\n      \"src_anchor\": {id, fqdn, city, asn, ...} | null,\n      \"dst_anchor\": {id, fqdn, city, asn, ...} | null,\n      \"cell\":       <topology-cell sub-doc with reached / hops /\n                     in_country / as_path / ixp_hops / ...>\n    }\n\n404 when the snapshot doesn't exist, either anchor isn't on the\nmatrix, or the cell row is null (diagonal / no envelope). The\nenvelope itself can also have aged out of\n``measurements_probes`` between snapshot and click — same 404\noutcome since there's nothing to render.",
        "operationId": "get_topology_cell_traceroute_anchors_mesh_topology__cc___af___date__cell__src_id___dst_id__traceroute_get",
        "parameters": [
          {
            "name": "cc",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cc"
            }
          },
          {
            "name": "af",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Af"
            }
          },
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Date"
            }
          },
          {
            "name": "src_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Src Id"
            }
          },
          {
            "name": "dst_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Dst Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Topology Cell Traceroute Anchors Mesh Topology  Cc   Af   Date  Cell  Src Id   Dst Id  Traceroute Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/anchors-mesh-topology/": {
      "get": {
        "tags": [
          "admin",
          "anchors-mesh-topology"
        ],
        "summary": "Admin Topology Summary",
        "description": "Admin-panel header: snapshot counts, eligible-country count,\nlast-snapshot timestamp, recent country leaderboard.",
        "operationId": "admin_topology_summary_admin_anchors_mesh_topology__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Topology Summary Admin Anchors Mesh Topology  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/anchors-mesh-topology/run": {
      "post": {
        "tags": [
          "admin",
          "anchors-mesh-topology"
        ],
        "summary": "Admin Topology Run",
        "description": "Manual one-shot trigger. Single-country mode when ``cc`` is\ngiven (and ``af`` optionally), full eligible-set mode otherwise.\n\nWrapped in :func:`run_and_record` so the run shows up in\n``db.task_history`` alongside the scheduled ones.",
        "operationId": "admin_topology_run_admin_anchors_mesh_topology_run_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Topology Run Admin Anchors Mesh Topology Run Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/anchors-mesh-topology/range": {
      "post": {
        "tags": [
          "admin",
          "anchors-mesh-topology"
        ],
        "summary": "Admin Topology Range",
        "description": "Window rebuild. 400 on bad input or span > settings cap.",
        "operationId": "admin_topology_range_admin_anchors_mesh_topology_range_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RangeBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Admin Topology Range Admin Anchors Mesh Topology Range Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/observations/events/": {
      "get": {
        "tags": [
          "observations"
        ],
        "summary": "List Events",
        "description": "Events, newest-first (summary shape — no heavy resolved block).",
        "operationId": "list_events_observations_events__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Events Observations Events  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "observations"
        ],
        "summary": "Create Event",
        "description": "Create an event (unresolved). 400 on invalid window / sources / coords.",
        "operationId": "create_event_observations_events__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Create Event Observations Events  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/observations/events/{event_id}": {
      "put": {
        "tags": [
          "observations"
        ],
        "summary": "Update Event",
        "description": "Edit an event's config (date/time, window, source points, label).\nChanging an analysis-affecting field resets the derived selection + mesh\nfetch record (re-resolve to recompute); a label-only edit keeps them. Never\ndeletes collected results in ``measurements_results``. 400 on invalid\nconfig; 404 if the event is gone.",
        "operationId": "update_event_observations_events__event_id__put",
        "parameters": [
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Event Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Update Event Observations Events  Event Id  Put"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "observations"
        ],
        "summary": "Get Event",
        "description": "Full event doc including the resolved Step-1 selection.",
        "operationId": "get_event_observations_events__event_id__get",
        "parameters": [
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Event Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Event Observations Events  Event Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "observations"
        ],
        "summary": "Delete Event",
        "operationId": "delete_event_observations_events__event_id__delete",
        "parameters": [
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Event Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Delete Event Observations Events  Event Id  Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/observations/events/{event_id}/resolve": {
      "post": {
        "tags": [
          "observations"
        ],
        "summary": "Resolve Event",
        "description": "(Re)compute the Step-1 selection (10 nearest connected-at-(T−W)\nanchors per source + window profiles). Synchronous (DB-only).",
        "operationId": "resolve_event_observations_events__event_id__resolve_post",
        "parameters": [
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Event Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Resolve Event Observations Events  Event Id  Resolve Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/observations/events/{event_id}/collect": {
      "post": {
        "tags": [
          "observations"
        ],
        "summary": "Collect Event",
        "description": "Step 2 — collect the 20-anchor mesh traceroute results over the window\nfrom RIPE and upsert into ``measurements_results``. Fire-and-forget (RIPE\nnetwork calls outlive the gateway timeout); poll ``GET /{id}`` and watch\n``mesh.fetch_status``. Requires a resolved selection.",
        "operationId": "collect_event_observations_events__event_id__collect_post",
        "parameters": [
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Event Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Collect Event Observations Events  Event Id  Collect Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/observations/events/{event_id}/matrix": {
      "get": {
        "tags": [
          "observations"
        ],
        "summary": "Event Matrix",
        "description": "Step 3 — per-pair traceroute metric series + pre-event baseline for the\ndelta mesh-matrix, for one IP family (``af`` 4 or 6). Requires the event to\nbe resolved + collected.",
        "operationId": "event_matrix_observations_events__event_id__matrix_get",
        "parameters": [
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Event Id"
            }
          },
          {
            "name": "af",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 4,
              "title": "Af"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Event Matrix Observations Events  Event Id  Matrix Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/observations/events/{event_id}/pair": {
      "get": {
        "tags": [
          "observations"
        ],
        "summary": "Event Pair",
        "description": "Step 3 drill-down — per-timestamp parsed traceroute path + metrics for\none ordered ``src → dst`` probe pair across the window.",
        "operationId": "event_pair_observations_events__event_id__pair_get",
        "parameters": [
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Event Id"
            }
          },
          {
            "name": "src",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Src"
            }
          },
          {
            "name": "dst",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Dst"
            }
          },
          {
            "name": "af",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 4,
              "title": "Af"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Event Pair Observations Events  Event Id  Pair Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/observations/events/{event_id}/trend": {
      "get": {
        "tags": [
          "observations"
        ],
        "summary": "Event Trend",
        "description": "Trend mode (long windows) — per-pair pre-vs-post ping deltas (RTT median,\nloss %, reachability) over the RIPE ping-stats downsample. The long-window\nanalog of the traceroute matrix; no path/reroute data. Requires a done\ntrend collect (``window_minutes > 60``).",
        "operationId": "event_trend_observations_events__event_id__trend_get",
        "parameters": [
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Event Id"
            }
          },
          {
            "name": "af",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 4,
              "title": "Af"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Event Trend Observations Events  Event Id  Trend Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/observations/events/{event_id}/trend/pair": {
      "get": {
        "tags": [
          "observations"
        ],
        "summary": "Event Trend Pair",
        "description": "Trend drill-down — the stored ping-stats bucket series (sent/received,\nloss %, RTT 5/50/95pct per bucket) for one ordered ``src probe → dst\nanchor`` pair, plus the pre-event baseline RTT.",
        "operationId": "event_trend_pair_observations_events__event_id__trend_pair_get",
        "parameters": [
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Event Id"
            }
          },
          {
            "name": "src",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Src"
            }
          },
          {
            "name": "dst",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Dst"
            }
          },
          {
            "name": "af",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 4,
              "title": "Af"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Event Trend Pair Observations Events  Event Id  Trend Pair Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/observations/events/{event_id}/narrative": {
      "post": {
        "tags": [
          "observations"
        ],
        "summary": "Generate Narrative",
        "description": "Generate an incident narrative for the event (fire-and-forget).\n\nA deterministic evidence packet is computed from the collected\nanalysis and DeepSeek is asked only to narrate it; output containing\nany figure the packet doesn't support is rejected. Backgrounded — the\ncompletion outlives the gateway timeout — so poll\n``GET /{id}/narrative``.\n\n400 on an unknown model alias, or when the event isn't resolved +\ncollected yet. Everything else (no API key, budget spent, upstream\nerror, ungrounded output) is recorded on the narrative row as a\n``failed`` status so the UI can show *why*.",
        "operationId": "generate_narrative_observations_events__event_id__narrative_post",
        "parameters": [
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Event Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NarrativeBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Generate Narrative Observations Events  Event Id  Narrative Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "observations"
        ],
        "summary": "Get Narratives",
        "description": "Stored narratives for an event — at most one per model alias, so a\nchat and a reasoner take can be compared side by side. Each row\ncarries the evidence packet it was written from, for audit.",
        "operationId": "get_narratives_observations_events__event_id__narrative_get",
        "parameters": [
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Event Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Narratives Observations Events  Event Id  Narrative Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchor-measurements/": {
      "get": {
        "tags": [
          "anchors",
          "measurements",
          "mongo"
        ],
        "summary": "List Anchor Measurements",
        "description": "Paginated catalog list. All filters AND-compose. Hides\ntombstoned rows by default (admin can see them via the admin\nlisting if needed).",
        "operationId": "list_anchor_measurements_anchor_measurements__get",
        "parameters": [
          {
            "name": "anchor_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anchor Id"
            }
          },
          {
            "name": "measurement_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Measurement Id"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Type"
            }
          },
          {
            "name": "is_mesh",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Is Mesh"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Anchor Measurements Anchor Measurements  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchor-measurements/by-anchor/{anchor_id}/": {
      "get": {
        "tags": [
          "anchors",
          "measurements",
          "mongo"
        ],
        "summary": "List For Anchor",
        "description": "All measurements pinned to a specific anchor — typically 5–10\nrows. Drives the AnchorDetailView \"Measurements\" tab. Each row\ncarries ``measurement_status_id`` / ``measurement_status_name`` /\n``measurement_last_result_time`` from a ``$lookup`` against\n``db.measurements_meta`` so the rendered list shows live status\nwithout a second round-trip.",
        "operationId": "list_for_anchor_anchor_measurements_by_anchor__anchor_id___get",
        "parameters": [
          {
            "name": "anchor_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Anchor Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List For Anchor Anchor Measurements By Anchor  Anchor Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchor-measurements/admin/stats/": {
      "get": {
        "tags": [
          "anchors",
          "measurements",
          "mongo"
        ],
        "summary": "Get Admin Stats",
        "description": "Combined run-stats + collection-stats blob for the admin panel.\n\nBoth sub-queries run in parallel worker threads via\n:func:`asyncio.to_thread` so the FastAPI event loop stays\nresponsive — without it the sequential synchronous PyMongo\nround-trips could overrun the 15 s client timeout on a slow\nMongo. See the matching ``anchors-mesh-health/admin/stats/``\nendpoint for the full rationale.",
        "operationId": "get_admin_stats_anchor_measurements_admin_stats__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Admin Stats Anchor Measurements Admin Stats  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchor-measurements/admin/runs/": {
      "get": {
        "tags": [
          "anchors",
          "measurements",
          "mongo"
        ],
        "summary": "List Admin Runs",
        "description": "Last N task_history rows for the refresh task.",
        "operationId": "list_admin_runs_anchor_measurements_admin_runs__get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Admin Runs Anchor Measurements Admin Runs  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchor-measurements/admin/refresh/run": {
      "post": {
        "tags": [
          "anchors",
          "measurements",
          "mongo"
        ],
        "summary": "Run Refresh",
        "description": "Cookie-auth manual refresh trigger. Same operation as the\napi-key-gated ``POST /atlas/anchor-measurements/refresh/`` in\n``api/main.py`` — duplicated here so the admin panel's\n\"Run refresh now\" button can fire it via the operator's\nsession cookie without needing an API key. Wrapped in\n:func:`run_and_record` so the run lands in ``db.task_history``\nalongside the scheduled ones.",
        "operationId": "run_refresh_anchor_measurements_admin_refresh_run_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Run Refresh Anchor Measurements Admin Refresh Run Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchor-measurements/admin/clear/": {
      "post": {
        "tags": [
          "anchors",
          "measurements",
          "mongo"
        ],
        "summary": "Clear Collection",
        "description": "Wipe ``db.anchor_measurements``.\n\nDestructive — the next refresh tick repopulates from RIPE.\n``db.task_history`` is not touched. Requires ``confirm: true``\nin the body.",
        "operationId": "clear_collection_anchor_measurements_admin_clear__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClearCollectionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Clear Collection Anchor Measurements Admin Clear  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/anchor-measurements/{am_id}/": {
      "get": {
        "tags": [
          "anchors",
          "measurements",
          "mongo"
        ],
        "summary": "Get Anchor Measurement",
        "operationId": "get_anchor_measurement_anchor_measurements__am_id___get",
        "parameters": [
          {
            "name": "am_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Am Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Anchor Measurement Anchor Measurements  Am Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/measurements-probes/": {
      "get": {
        "tags": [
          "measurements",
          "probes",
          "mongo"
        ],
        "summary": "List Measurements Probes",
        "description": "Paginated participation catalog. Either or both of\n``measurement_id`` / ``probe_id`` narrow the result set. Hides\ntombstoned pairs by default.",
        "operationId": "list_measurements_probes_measurements_probes__get",
        "parameters": [
          {
            "name": "measurement_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Measurement Id"
            }
          },
          {
            "name": "probe_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Probe Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Measurements Probes Measurements Probes  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/measurements-probes/by-measurement/{measurement_id}/": {
      "get": {
        "tags": [
          "measurements",
          "probes",
          "mongo"
        ],
        "summary": "List For Measurement",
        "description": "Every probe currently participating in one measurement.\n\nDefault ``limit`` is generous (1000) — mesh measurements run\n~700 anchors and the typical caller wants the full list in one\nresponse. Bump ``offset`` for pagination if the call ever exceeds\nthe cap.",
        "operationId": "list_for_measurement_measurements_probes_by_measurement__measurement_id___get",
        "parameters": [
          {
            "name": "measurement_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Measurement Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1000,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List For Measurement Measurements Probes By Measurement  Measurement Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/measurements-probes/by-probe/{probe_id}/": {
      "get": {
        "tags": [
          "measurements",
          "probes",
          "mongo"
        ],
        "summary": "List For Probe",
        "description": "Every measurement one probe currently participates in. Reverse\nof the per-measurement lookup — useful for probe-detail drill-downs.",
        "operationId": "list_for_probe_measurements_probes_by_probe__probe_id___get",
        "parameters": [
          {
            "name": "probe_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Probe Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1000,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List For Probe Measurements Probes By Probe  Probe Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/measurements-probes/admin/stats/": {
      "get": {
        "tags": [
          "measurements",
          "probes",
          "mongo"
        ],
        "summary": "Get Admin Stats",
        "description": "Combined run-stats + collection-stats blob for the admin panel.\n\nBoth sub-queries run in parallel worker threads via\n:func:`asyncio.to_thread` so the FastAPI event loop stays\nresponsive — see the matching anchors-mesh-health admin/stats\nendpoint for the round-trip-consolidation rationale.",
        "operationId": "get_admin_stats_measurements_probes_admin_stats__get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Admin Stats Measurements Probes Admin Stats  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/measurements-probes/admin/runs/": {
      "get": {
        "tags": [
          "measurements",
          "probes",
          "mongo"
        ],
        "summary": "List Admin Runs",
        "description": "Last N task_history rows for the refresh task.",
        "operationId": "list_admin_runs_measurements_probes_admin_runs__get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Admin Runs Measurements Probes Admin Runs  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/measurements-probes/admin/refresh/run": {
      "post": {
        "tags": [
          "measurements",
          "probes",
          "mongo"
        ],
        "summary": "Run Refresh",
        "description": "Cookie-auth manual refresh trigger.\n\nFire-and-forget — mirrors the shape of the api-key-gated\n``POST /atlas/measurements-probes/refresh/`` so reverse-proxy\ntimeouts can't cut the refresh mid-walk. The work runs in a\nbackground thread under :func:`run_and_record` and the eventual\nsummary lands in ``db.task_history``; the admin panel polls\n``GET /admin/runs/`` for completion.\n\nReturns one of two shapes:\n\n- ``{\"status\": \"started\", ...}`` — the run was spawned.\n- ``{\"status\": \"already_running\", ...}`` — another refresh is in\n  flight in this process; nothing was spawned.",
        "operationId": "run_refresh_measurements_probes_admin_refresh_run_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Run Refresh Measurements Probes Admin Refresh Run Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/measurements-probes/admin/clear/": {
      "post": {
        "tags": [
          "measurements",
          "probes",
          "mongo"
        ],
        "summary": "Clear Collection",
        "description": "Wipe ``db.measurements_probes``. Destructive — the next refresh\ntick rebuilds from RIPE. Requires ``confirm: true``.",
        "operationId": "clear_collection_measurements_probes_admin_clear__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClearCollectionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Clear Collection Measurements Probes Admin Clear  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/measurements-probes/{measurement_id}/{probe_id}/": {
      "get": {
        "tags": [
          "measurements",
          "probes",
          "mongo"
        ],
        "summary": "Get Pair",
        "operationId": "get_pair_measurements_probes__measurement_id___probe_id___get",
        "parameters": [
          {
            "name": "measurement_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Measurement Id"
            }
          },
          {
            "name": "probe_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Probe Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Pair Measurements Probes  Measurement Id   Probe Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/regions/": {
      "get": {
        "tags": [
          "regions",
          "mongo"
        ],
        "summary": "List Regions",
        "description": "Public list of every region with full country lists inline.\n\nThe dataset is small (<50 rows × ~20 country codes each); no\npagination needed. Same shape as a single ``GET /regions/{slug}/``,\njust in an array — the UI's expansion-panel UX can skip the\nfollow-up detail fetch.",
        "operationId": "list_regions_regions__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Regions Regions  Get"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "regions",
          "mongo"
        ],
        "summary": "Create Region",
        "description": "Create a new region. Admin-only.\n\nValidates that every cca2 in ``countries`` exists in ``db.countries``\nso a typo at create time can't poison the data. Unknown codes\nsurface as 422 with the offending codes echoed back.",
        "operationId": "create_region_regions__post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegionCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Create Region Regions  Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/regions/{slug}/": {
      "get": {
        "tags": [
          "regions",
          "mongo"
        ],
        "summary": "Get Region",
        "description": "Public detail for a single region. 404 on miss.",
        "operationId": "get_region_regions__slug___get",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Region Regions  Slug   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "regions",
          "mongo"
        ],
        "summary": "Update Region",
        "description": "Update an existing region's description + countries. Admin-only.\n\nThe slug is immutable (it's the docId flags / comments / anchor\nfilters key on) so it's path-only and never re-validated here.\n422 on unknown cca2 codes; 404 when the slug doesn't exist.",
        "operationId": "update_region_regions__slug___put",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegionUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Update Region Regions  Slug   Put"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "regions",
          "mongo"
        ],
        "summary": "Delete Region",
        "description": "Delete a region by slug. Admin-only. 404 on miss.",
        "operationId": "delete_region_regions__slug___delete",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Delete Region Regions  Slug   Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/task-history/": {
      "get": {
        "tags": [
          "mongo"
        ],
        "summary": "List Task History",
        "description": "List task-run summaries, most-recent first.\n\nOptional filters:\n\n- ``task_name`` — exact match (e.g. ``refresh_probes``).\n- ``status`` — ``success`` or ``failed``.\n- ``trigger`` — ``scheduled`` or ``manual``.\n\n``limit`` is clamped to 1000 to keep responses bounded.",
        "operationId": "list_task_history_task_history__get",
        "parameters": [
          {
            "name": "task_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Task Name"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "trigger",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Trigger"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Task History Task History  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/task-history/{run_id}/": {
      "get": {
        "tags": [
          "mongo"
        ],
        "summary": "Get Task Run",
        "description": "Fetch a single task-run summary by its ``_id``.\n\nThe id is the stringified ObjectId returned in the list endpoint.",
        "operationId": "get_task_run_task_history__run_id___get",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Run Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          },
          {
            "name": "atlas_session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Atlas Session"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Task Run Task History  Run Id   Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/trends/hbase/": {
      "get": {
        "tags": [
          "probes",
          "measurements",
          "trends",
          "performance"
        ],
        "summary": "Get Latest Speed",
        "operationId": "get_latest_speed_trends_hbase__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/": {
      "get": {
        "summary": "Root",
        "operationId": "root__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/health/": {
      "get": {
        "tags": [
          "health"
        ],
        "summary": "Health",
        "operationId": "health_health__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/ris/live/asn/{asn}/": {
      "get": {
        "tags": [
          "ris",
          "ASN"
        ],
        "summary": "Get Latest Ris Live",
        "operationId": "get_latest_ris_live_ris_live_asn__asn___get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/test/private": {
      "post": {
        "summary": "Private",
        "description": "A private endpoint that requires a valid API key to be provided.",
        "operationId": "private_test_private_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyQuery": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/atlas/probes/refresh/": {
      "post": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "Refresh Probes",
        "description": "Pull every probe from RIPE Atlas and upsert into ``db.probes``.\n\nSynchronous from the caller's perspective — the request blocks for\nthe duration of the refresh (~1–3 min for ~50k probes). Used as a\nbootstrap (the first hourly tick may be up to an hour away on a\nfresh deploy) and as a manual recovery handle when the scheduled\njob fails. Returns the summary dict from\n:meth:`Probes.refresh_all`.\n\nRouted through :func:`run_and_record` so this manual run lands in\n``db.task_history`` next to the scheduled ones, distinguishable by\nthe ``trigger=\"manual\"`` field.",
        "operationId": "refresh_probes_atlas_probes_refresh__post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyQuery": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/atlas/anchors/refresh/": {
      "post": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Refresh Anchors",
        "description": "Pull every anchor from RIPE Atlas and upsert into ``db.anchors``.\n\nSynchronous from the caller's perspective — the request blocks\nfor the duration of the refresh (~10 s for ~1700 anchors). Used\nas a bootstrap on a fresh deploy and as a manual recovery handle\nwhen the hourly job fails. Returns the summary dict from\n:meth:`Anchors.refresh_all`.\n\nRouted through :func:`run_and_record` so this manual run lands\nin ``db.task_history`` next to the scheduled ones, distinguishable\nby the ``trigger=\"manual\"`` field.",
        "operationId": "refresh_anchors_atlas_anchors_refresh__post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyQuery": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/atlas/anchor-measurements/refresh/": {
      "post": {
        "tags": [
          "anchors",
          "measurements",
          "mongo"
        ],
        "summary": "Refresh Anchor Measurements",
        "description": "Pull RIPE's anchor-measurement catalog and reconcile\n``db.anchor_measurements`` now.\n\nSynchronous from the caller's perspective (~10 s for ~10k rows).\nUsed as a bootstrap on a fresh deploy + as the manual recovery\nhandle when the 6-hourly job fails. Returns the summary dict\nfrom :meth:`AnchorMeasurements.refresh_all`.\n\nRouted through :func:`run_and_record` so this manual run lands\nin ``db.task_history`` alongside the scheduled ones,\ndistinguishable by the ``trigger=\"manual\"`` field.",
        "operationId": "refresh_anchor_measurements_atlas_anchor_measurements_refresh__post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyQuery": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/atlas/measurements-probes/refresh/": {
      "post": {
        "tags": [
          "measurements",
          "probes",
          "mongo"
        ],
        "summary": "Refresh Measurements Probes",
        "description": "Kick a fresh ``db.measurements_probes`` refresh and return\nimmediately.\n\nFire-and-forget by design — the refresh walks every live anchor\nmeasurement with one RIPE round-trip each (5–10 min even with the\n8-way concurrency inside :meth:`MeasurementsProbes.refresh_all`),\nwhich is well past any reverse-proxy timeout. The work runs in\na background thread under :func:`run_and_record`, so the eventual\nsuccess / failure / counters land in ``db.task_history`` and can\nbe polled via ``GET /measurements-probes/admin/runs/``.\n\nReturns one of two shapes:\n\n- ``{\"status\": \"started\", ...}`` — the run was spawned.\n- ``{\"status\": \"already_running\", ...}`` — another refresh is in\n  flight in this process; nothing was spawned. Operator should\n  wait for the in-flight run to finish and poll the runs endpoint.",
        "operationId": "refresh_measurements_probes_atlas_measurements_probes_refresh__post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyQuery": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/atlas/anchors-health/snapshot/": {
      "post": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Snapshot Anchors Health",
        "description": "Run the anchor-health snapshot pass now.\n\nEvaluates every active anchor against the issue-rule registry\n(see :mod:`api.atlas.anchors_health`), upserts current state into\n``db.anchors_health``, and appends state-transition events to\n``db.anchors_health_events``. Manual companion to the hourly\n``snapshot_anchors_health`` cron — bootstrap on a fresh deploy\n(the next cron tick can be up to an hour away) or recover after\nan outage.\n\nRouted through :func:`run_and_record` so the run lands in\n``db.task_history`` next to the scheduled ones, distinguishable\nby the ``trigger=\"manual\"`` field.",
        "operationId": "snapshot_anchors_health_atlas_anchors_health_snapshot__post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyQuery": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/atlas/probes-health/snapshot/": {
      "post": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "Snapshot Probes Health",
        "description": "Run the probe-health snapshot pass now.\n\nEvaluates the candidate probe set against the issue-rule registry\n(see :mod:`api.atlas.probes_health`), upserts current state into\n``db.probes_health``, and appends state-transition events to\n``db.probes_health_events``. Manual companion to the hourly\n``snapshot_probes_health`` cron — the *first* manual call after a\nfresh deploy runs the one-time bootstrap (whole-fleet) pass so the\ndashboard isn't empty until the next cron tick.\n\nRouted through :func:`run_and_record` so the run lands in\n``db.task_history`` next to the scheduled ones,\n``trigger=\"manual\"``.",
        "operationId": "snapshot_probes_health_atlas_probes_health_snapshot__post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyQuery": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/atlas/anchors-mesh-health/snapshot/": {
      "post": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Snapshot Anchors Mesh Health",
        "description": "Run the mesh-health snapshot pass now.\n\nEvaluates every active anchor against the mesh-coverage rules\n(see :mod:`api.atlas.anchors_mesh_health`), upserts current\nstate into ``db.anchors_mesh_health``, and appends state-\ntransition events to ``db.anchors_mesh_health_events``. Manual\ncompanion to the daily ``snapshot_anchors_mesh_health`` cron —\nbootstrap on a fresh deploy or recover after an outage.\n\nThe pipeline is pure set-math against pre-loaded Mongo data\n(no upstream RIPE calls), so it completes in seconds even\nacross ~700 anchors and a few thousand mesh measurements; a\nsynchronous response is fine here, no fire-and-forget needed.\n\nRouted through :func:`run_and_record` so the run lands in\n``db.task_history`` next to the scheduled ones, distinguishable\nby the ``trigger=\"manual\"`` field.",
        "operationId": "snapshot_anchors_mesh_health_atlas_anchors_mesh_health_snapshot__post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyQuery": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/atlas/mesh-quality/derive/": {
      "post": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Derive Mesh Quality",
        "description": "Run the mesh-quality derivation now.\n\nMines ``db.measurements_probes`` into directed link facts +\nper-anchor quality rollups (see :mod:`api.atlas.mesh_quality`),\nrebuilds ``db.mesh_links``, upserts ``db.mesh_anchor_quality``,\nappends the daily history points, and maintains the degraded-link\nwatchlist. Manual companion to the daily ``derive_mesh_quality``\ncron — bootstrap a fresh deploy or re-derive after a\n``measurements_probes`` refresh. Pure DB (no RIPE); idempotent +\nsafe to spam (history rows are keyed by day).\n\nRouted through :func:`run_and_record` so the run lands in\n``db.task_history`` next to the scheduled ones,\n``trigger=\"manual\"``.",
        "operationId": "derive_mesh_quality_atlas_mesh_quality_derive__post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyQuery": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/atlas/anchors-dns/snapshot/": {
      "post": {
        "tags": [
          "anchors",
          "mongo"
        ],
        "summary": "Snapshot Anchors Dns",
        "description": "Run the anchor-FQDN DNS-resolution drain now (bulk burst).\n\nRe-resolves every anchor whose stored ``db.anchors_dns`` result is\nmissing or older than the TTL (oldest-first), up to the\nserver-side ``AnchorsDnsSettings.MANUAL_MAX`` ceiling, and compares\neach FQDN's A/AAAA against the anchor / embedded-probe addresses.\nManual companion to the ~20-min ``snapshot_anchors_dns`` cron —\nbootstrap a fresh deploy or force convergence right after a\ndeliberate anchor-address change instead of waiting for the drain\nto grind through. Idempotent + safe to spam (bounded; a fresh\nanchor is a no-op re-resolve).\n\nRouted through :func:`run_and_record` so the run lands in\n``db.task_history`` next to the scheduled ones, distinguishable\nby the ``trigger=\"manual\"`` field.",
        "operationId": "snapshot_anchors_dns_atlas_anchors_dns_snapshot__post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyQuery": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/atlas/probe-measurement-health/snapshot/": {
      "post": {
        "tags": [
          "probes",
          "mongo"
        ],
        "summary": "Snapshot Probe Measurement Health",
        "description": "Run the probe measurement-result health drain now (bulk burst).\n\nRe-checks every connected, ``system-ipvX-works``-tagged probe whose\nstored ``db.probe_measurement_health`` result is missing or older\nthan the TTL (oldest-first), up to the server-side\n``ProbeMeasurementHealthSettings.MANUAL_MAX`` ceiling. Manual\ncompanion to the 15-min ``drain_probe_measurement_health`` cron —\nbootstrap a fresh deploy or force convergence instead of waiting\nfor the drain to grind through. Idempotent + safe to spam\n(bounded; a fresh probe is a no-op re-check).\n\nRouted through :func:`run_and_record` so the run lands in\n``db.task_history`` next to the scheduled ones,\n``trigger=\"manual\"``.",
        "operationId": "snapshot_probe_measurement_health_atlas_probe_measurement_health_snapshot__post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyQuery": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/atlas/countries/refresh/": {
      "post": {
        "tags": [
          "countries",
          "mongo"
        ],
        "summary": "Refresh Countries",
        "description": "Pull every country from REST Countries and upsert into ``db.countries``.\n\nSingle HTTP call to the upstream + a single bulk_write — usually\ncompletes in well under a second. Used as a bootstrap on a fresh\ndeploy (the next weekly tick can be up to 7 days away) and as a\nmanual recovery handle when the scheduled job fails.\n\nRouted through :func:`run_and_record` so this manual run lands in\n``db.task_history`` next to the scheduled ones, distinguishable by\nthe ``trigger=\"manual\"`` field.",
        "operationId": "refresh_countries_atlas_countries_refresh__post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyQuery": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/atlas/dnsmon/refresh/": {
      "post": {
        "tags": [
          "dnsmon",
          "mongo"
        ],
        "summary": "Refresh Dnsmon Anchors",
        "description": "Pull the DNSMON anchor set and reconcile ``db.anchors_dnsmon``.\n\nSingle upstream HTTP call + a small bulk-write — sub-second.\nBootstraps a fresh deploy (the next daily tick can be ~24h away)\nand is the manual recovery handle if the scheduled job fails.\nSanity-guarded so a bad upstream response can't wipe the set.\n\nRouted through :func:`run_and_record` so it lands in\n``db.task_history`` next to the scheduled run (``trigger=\"manual\"``).",
        "operationId": "refresh_dnsmon_anchors_atlas_dnsmon_refresh__post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyQuery": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/atlas/probes-archive/refresh/": {
      "post": {
        "tags": [
          "probes",
          "archive",
          "mongo"
        ],
        "summary": "Refresh Probes Archive",
        "description": "Import the RIPE probe-archive for one date (default: yesterday).\n\nSynchronous from the caller's perspective — the request blocks for\nthe duration of the import (~minutes for ~50k probes). Routed\nthrough :func:`run_and_record` so the run lands in both\n``db.task_history`` (operational view) and\n``db.probes_archive_daily`` (per-date business view).",
        "operationId": "refresh_probes_archive_atlas_probes_archive_refresh__post",
        "security": [
          {
            "APIKeyQuery": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/atlas/events/connections/refresh/": {
      "post": {
        "tags": [
          "events",
          "mongo"
        ],
        "summary": "Refresh Events Connections",
        "description": "Run the connection-events ingest's recent-window scan now.\n\nMirror of the cron's ``import_recent``. Synchronous from the\ncaller's perspective — usually completes in seconds because the\noverlap window is short. For arbitrary-range backfills use the\nadmin cookie-session endpoint at\n``POST /events/connections/backfill`` instead; this api-key\nendpoint is the cron's manual companion (parallel to\n``POST /atlas/probes/refresh/``).",
        "operationId": "refresh_events_connections_atlas_events_connections_refresh__post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyQuery": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/atlas/as-population/refresh/": {
      "post": {
        "tags": [
          "as-population",
          "mongo"
        ],
        "summary": "Refresh As Population",
        "description": "Pull the latest global APNIC AS-population snapshot now.\n\nMirror of the daily cron's ``import_latest`` — one HTTP call,\ncompletes in seconds. For historical date ranges use the admin\ncookie-session endpoint ``POST /as-population/backfill`` instead;\nthis api-key route is the cron's manual companion.",
        "operationId": "refresh_as_population_atlas_as_population_refresh__post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyQuery": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/atlas/unlocode/refresh/": {
      "post": {
        "tags": [
          "unlocode",
          "mongo"
        ],
        "summary": "Refresh Unlocode",
        "description": "Queue an improved-UN/LOCODE import (ops companion to the admin\npanel's Run button). Returns immediately — the serial worker does\nthe ~13 MB code-list + ~17 MB aliases parse off-thread and writes\nthe audit row. ``?force=true`` re-runs even if the upstream commit\nis unchanged (default skips a no-op download).",
        "operationId": "refresh_unlocode_atlas_unlocode_refresh__post",
        "security": [
          {
            "APIKeyQuery": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "force",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Force"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/atlas/data-delay/refresh/": {
      "post": {
        "tags": [
          "data-delay",
          "mongo"
        ],
        "summary": "Refresh Data Delay",
        "description": "Pull one ``/api/v2/system/data-delay/`` snapshot now and\nupsert into ``db.data_delay``.\n\nManual companion to the every-minute ``ingest_data_delay`` cron\n— useful for bootstrap (the next minute boundary can be up to a\nminute away on a fresh deploy) and for re-trying after a brief\nupstream outage. Routed through :func:`run_and_record` so the\nmanual run lands in ``db.task_history`` next to the scheduled\nones, distinguishable by ``trigger=\"manual\"``.",
        "operationId": "refresh_data_delay_atlas_data_delay_refresh__post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyQuery": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/atlas/measurements/import-new/": {
      "post": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Import New Measurements",
        "description": "Pull newly-created RIPE measurements (id > local watermark) now.\n\nManual companion to the 15-minute ``import_new_measurements``\ncron — bootstrap on a fresh deploy (the next cron tick can be\nup to 15 min away), or trigger immediately after restoring\nfrom a backup. Per-tick cap from\n:attr:`MeasurementsMetaSettings.SCHEDULED_TICK_MAX` still\napplies; re-run for further catch-up after a long gap.",
        "operationId": "import_new_measurements_atlas_measurements_import_new__post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyQuery": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/atlas/measurements/refresh-oneoffs/": {
      "post": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Refresh Oneoff Measurements",
        "description": "Sweep cached one-off measurements still in Scheduled (1) or\nOngoing (2) and force-refresh them from RIPE now.\n\nManual companion to the 15-minute ``refresh_oneoff_measurements``\ncron. Bounded by ``limit`` (default\n:attr:`MeasurementsMetaSettings.ONEOFF_REFRESH_TICK_MAX`); re-run\nfor further catch-up when a backlog is bigger than one tick can\ndrain. Routed through :func:`run_and_record` so the run lands\nin ``db.task_history`` alongside the scheduled ones.",
        "operationId": "refresh_oneoff_measurements_atlas_measurements_refresh_oneoffs__post",
        "security": [
          {
            "APIKeyQuery": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/atlas/measurements/refresh-periodics/": {
      "post": {
        "tags": [
          "measurements",
          "mongo"
        ],
        "summary": "Refresh Periodic Measurements",
        "description": "Sweep cached recurring measurements still in Scheduled (1)\nand force-refresh them from RIPE now.\n\nManual companion to the 15-minute\n``refresh_periodic_measurements`` cron. Bounded by ``limit``\n(default :attr:`MeasurementsMetaSettings.ONEOFF_REFRESH_TICK_MAX`,\nreused across both sweeps — same operational characteristics);\nre-run for further catch-up when a backlog is bigger than one\ntick can drain. Routed through :func:`run_and_record` so the\nrun lands in ``db.task_history`` alongside the scheduled ones.",
        "operationId": "refresh_periodic_measurements_atlas_measurements_refresh_periodics__post",
        "security": [
          {
            "APIKeyQuery": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/outages/": {
      "get": {
        "tags": [
          "outages"
        ],
        "summary": "List Outages",
        "description": "Outages newest first. A fleet-wide event — several controllers of\ndifferent probe classes dropping at once — is one entry of type\n``fleet``, its controllers listed inside it. A network outage inside a\ncountry outage names it in ``country_outage``.",
        "operationId": "list_outages_outages__get",
        "parameters": [
          {
            "name": "since_ts",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ],
              "description": "Outages still open or closed at or after this",
              "title": "Since Ts"
            },
            "description": "Outages still open or closed at or after this"
          },
          {
            "name": "until_ts",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ],
              "description": "Outages that started before this",
              "title": "Until Ts"
            },
            "description": "Outages that started before this"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "controller",
                    "country",
                    "asn"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "``controller`` includes fleet-wide events; ``country`` is many probes in one country; ``asn`` is per network",
              "title": "Type"
            },
            "description": "``controller`` includes fleet-wide events; ``country`` is many probes in one country; ``asn`` is per network"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "live",
                    "scan"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source"
            }
          },
          {
            "name": "cc",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^[A-Za-z]{2}$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "One country (ISO 3166-1 alpha-2): its country outages, and network outages with probes there. Controllers are in no country.",
              "title": "Cc"
            },
            "description": "One country (ISO 3166-1 alpha-2): its country outages, and network outages with probes there. Controllers are in no country."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Outages Outages  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/outages/{outage_id}": {
      "get": {
        "tags": [
          "outages"
        ],
        "summary": "Get Outage",
        "description": "One outage by the ``id`` a listing gave it: ``controller:…``,\n``fleet:…``, ``country:…`` or ``asn:…``.",
        "operationId": "get_outage_outages__outage_id__get",
        "parameters": [
          {
            "name": "outage_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Outage Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Outage Outages  Outage Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AdminPasswordResetPayload": {
        "properties": {
          "new_password": {
            "type": "string",
            "minLength": 8,
            "title": "New Password"
          }
        },
        "type": "object",
        "required": [
          "new_password"
        ],
        "title": "AdminPasswordResetPayload"
      },
      "AlertAckBody": {
        "properties": {
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          }
        },
        "type": "object",
        "title": "AlertAckBody"
      },
      "AlertCloseBody": {
        "properties": {
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          }
        },
        "type": "object",
        "title": "AlertCloseBody"
      },
      "AlertNarrativeBody": {
        "properties": {
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model",
            "description": "Model alias — one of chat/reasoner (default chat). ``reasoner`` costs more budget but reasons harder about probable cause."
          },
          "force": {
            "type": "boolean",
            "title": "Force",
            "description": "Regenerate even when a note already exists for this exact evidence + model. Without it, unchanged evidence is a cache hit and costs nothing.",
            "default": false
          }
        },
        "type": "object",
        "title": "AlertNarrativeBody",
        "description": "Which model writes the triage note, and whether to bypass cache."
      },
      "AlertSnoozeBody": {
        "properties": {
          "until_ts": {
            "type": "integer",
            "title": "Until Ts",
            "description": "Unix timestamp; a value in the past clears the snooze."
          }
        },
        "type": "object",
        "required": [
          "until_ts"
        ],
        "title": "AlertSnoozeBody"
      },
      "ApiKeyPayload": {
        "properties": {
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          }
        },
        "type": "object",
        "title": "ApiKeyPayload",
        "description": "Set or clear the user's RIPE Atlas API key.\n\n``None`` clears the key. The shape uses ``api_key`` (with an\nunderscore) to match python conventions; the frontend sends the\nsame key."
      },
      "BackfillStaleStats": {
        "properties": {
          "max_days": {
            "type": "integer",
            "minimum": 1,
            "title": "Max Days",
            "description": "one-shot burst cap (server-clamped)",
            "default": 1000
          }
        },
        "type": "object",
        "title": "BackfillStaleStats",
        "description": "Body for ``POST /admin/measurements/daily/backfill-stale-stats``.\n\n``max_days`` is the one-shot burst cap (default a large burst;\nserver-clamped to ``_BACKFILL_BURST_CEILING``). Idempotent and\nsafe to spam — re-running over fresh days is a no-op write."
      },
      "BackfillStatus": {
        "properties": {
          "queued": {
            "type": "integer",
            "title": "Queued"
          },
          "in_flight": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "In Flight"
          },
          "worker_alive": {
            "type": "boolean",
            "title": "Worker Alive"
          }
        },
        "type": "object",
        "required": [
          "queued",
          "in_flight",
          "worker_alive"
        ],
        "title": "BackfillStatus",
        "description": "Snapshot of the in-process worker.\n\n``worker_alive`` is ``True`` when the consumer task is up and\nprocessing. ``False`` means the worker died (or hasn't started);\nthe admin dashboard surfaces a warning + recovery button when\nthis is ``False``."
      },
      "BudgetSetCapBody": {
        "properties": {
          "cap": {
            "type": "integer",
            "minimum": 0,
            "title": "Cap",
            "description": "Daily UDM-spawn cap for this user (today's UTC day only — subsequent days revert to the deployment default until the admin sets a new cap)."
          }
        },
        "type": "object",
        "required": [
          "cap"
        ],
        "title": "BudgetSetCapBody"
      },
      "ChannelCreateBody": {
        "properties": {
          "kind": {
            "type": "string",
            "title": "Kind",
            "description": "One of ['email', 'webhook'] (inbox auto-managed)."
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "config": {
            "additionalProperties": true,
            "type": "object",
            "title": "Config"
          },
          "tag_filter": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tag Filter"
          },
          "severity_filter": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Severity Filter"
          },
          "rate_limit_per_hour": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rate Limit Per Hour"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "kind"
        ],
        "title": "ChannelCreateBody"
      },
      "ChannelPatchBody": {
        "properties": {
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          },
          "tag_filter": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tag Filter"
          },
          "severity_filter": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Severity Filter"
          },
          "rate_limit_per_hour": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rate Limit Per Hour"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          }
        },
        "type": "object",
        "title": "ChannelPatchBody"
      },
      "CheckCreateBody": {
        "properties": {
          "kind": {
            "type": "string",
            "title": "Kind",
            "description": "One of ['anycast_status', 'as_population_shift', 'as_prefix_count', 'bgp_announce', 'dns_resolve', 'geofeed_status', 'http_status', 'path_stability', 'ping_loss', 'rpki_status', 'tls_cert', 'traceroute_reach']."
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          },
          "every_s": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Every S"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "default": true
          },
          "flap_threshold": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Flap Threshold"
          }
        },
        "type": "object",
        "required": [
          "kind"
        ],
        "title": "CheckCreateBody"
      },
      "CheckPatchBody": {
        "properties": {
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          },
          "every_s": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Every S"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          },
          "flap_threshold": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Flap Threshold"
          }
        },
        "type": "object",
        "title": "CheckPatchBody"
      },
      "ClearCollectionRequest": {
        "properties": {
          "confirm": {
            "type": "boolean",
            "title": "Confirm",
            "default": false
          }
        },
        "type": "object",
        "title": "ClearCollectionRequest",
        "description": "Confirmation envelope for the destructive clear-collection\naction. Operator must POST ``{\"confirm\": true}`` explicitly —\na missing or false ``confirm`` is treated as a misclick."
      },
      "CommentCreate": {
        "properties": {
          "target": {
            "$ref": "#/components/schemas/CommentTarget"
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "title": "Body"
          },
          "private": {
            "type": "boolean",
            "title": "Private",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "target",
          "body"
        ],
        "title": "CommentCreate"
      },
      "CommentTarget": {
        "properties": {
          "collection": {
            "type": "string",
            "minLength": 1,
            "title": "Collection"
          },
          "doc_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ],
            "title": "Doc Id"
          }
        },
        "type": "object",
        "required": [
          "collection",
          "doc_id"
        ],
        "title": "CommentTarget"
      },
      "CommentUpdate": {
        "properties": {
          "body": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Body"
          },
          "private": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Private"
          }
        },
        "type": "object",
        "title": "CommentUpdate"
      },
      "CreateKeyRequest": {
        "properties": {
          "label": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "title": "Label"
          },
          "scopes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scopes"
          },
          "expires_at_ts": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At Ts"
          }
        },
        "type": "object",
        "required": [
          "label"
        ],
        "title": "CreateKeyRequest",
        "description": "Payload for ``POST /account/api-keys/``.\n\n``label`` is a short human-readable identifier the user chooses on\nthe creation form. ``scopes`` defaults to ``[\"read\"]`` server-side\nif omitted; ``write`` opts in to mutation endpoints.\n``expires_at_ts`` is absolute unix-seconds; ``null`` means no\nexpiry (user can change their mind later via the listing UI)."
      },
      "CreateUserPayload": {
        "properties": {
          "username": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "title": "Username"
          },
          "password": {
            "type": "string",
            "minLength": 8,
            "title": "Password"
          },
          "role": {
            "type": "string",
            "title": "Role",
            "default": "viewer"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          }
        },
        "type": "object",
        "required": [
          "username",
          "password"
        ],
        "title": "CreateUserPayload"
      },
      "DateParameter": {
        "type": "string",
        "enum": [
          "today",
          "yesterday",
          "last-week",
          "last-month",
          "last-quarter",
          "last-year",
          "this-week",
          "this-month",
          "this-quarter",
          "this-year"
        ],
        "title": "DateParameter"
      },
      "DateRangeSubmit": {
        "properties": {
          "since": {
            "type": "string",
            "title": "Since",
            "description": "inclusive start date, YYYY-MM-DD"
          },
          "until": {
            "type": "string",
            "title": "Until",
            "description": "inclusive end date, YYYY-MM-DD"
          }
        },
        "type": "object",
        "required": [
          "since",
          "until"
        ],
        "title": "DateRangeSubmit"
      },
      "EmailPayload": {
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          }
        },
        "type": "object",
        "title": "EmailPayload",
        "description": "Set or clear the current user's email. ``None`` / empty clears."
      },
      "EventCreate": {
        "properties": {
          "event_ts": {
            "type": "integer",
            "title": "Event Ts",
            "description": "UTC unix seconds (the event instant T)"
          },
          "window_minutes": {
            "type": "integer",
            "title": "Window Minutes",
            "description": "symmetric window (± minutes). ≤60 → detail mode (raw ping+traceroute firehose + matrix). >60 → trend mode (RIPE ping-stats downsample only). One of 10/20/30/40/50/60/360/720/1440/4320/10080."
          },
          "sources": {
            "items": {
              "$ref": "#/components/schemas/SourceIn"
            },
            "type": "array",
            "title": "Sources",
            "description": "exactly two points: A, B"
          },
          "label": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          }
        },
        "type": "object",
        "required": [
          "event_ts",
          "window_minutes",
          "sources"
        ],
        "title": "EventCreate"
      },
      "ExplainBody": {
        "properties": {
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "force": {
            "type": "boolean",
            "title": "Force",
            "default": false
          }
        },
        "type": "object",
        "title": "ExplainBody"
      },
      "FillDaysRequest": {
        "properties": {
          "dates": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Dates",
            "description": "YYYY-MM-DD dates to fill"
          }
        },
        "type": "object",
        "required": [
          "dates"
        ],
        "title": "FillDaysRequest",
        "description": "Body for ``POST /admin/measurements/daily/fill``. One\n``date_day`` job is queued per date (gap-fill, no reprocess\nseal)."
      },
      "FlagCreate": {
        "properties": {
          "target": {
            "$ref": "#/components/schemas/FlagTarget"
          },
          "type": {
            "type": "string",
            "title": "Type",
            "default": "issue"
          },
          "priority": {
            "type": "string",
            "title": "Priority",
            "default": "medium"
          },
          "notes": {
            "type": "string",
            "minLength": 1,
            "title": "Notes"
          },
          "due_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Due Date",
            "description": "Optional YYYY-MM-DD. Drives 'overdue first' sorting."
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url",
            "description": "Optional external work-item link (e.g. a JSM ticket). Must be http(s). Surfaced in the UI for the 'ticket' type."
          },
          "private": {
            "type": "boolean",
            "title": "Private",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "target",
          "notes"
        ],
        "title": "FlagCreate"
      },
      "FlagDoneToggle": {
        "properties": {
          "done": {
            "type": "boolean",
            "title": "Done"
          }
        },
        "type": "object",
        "required": [
          "done"
        ],
        "title": "FlagDoneToggle"
      },
      "FlagTarget": {
        "properties": {
          "collection": {
            "type": "string",
            "minLength": 1,
            "title": "Collection"
          },
          "doc_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ],
            "title": "Doc Id"
          }
        },
        "type": "object",
        "required": [
          "collection",
          "doc_id"
        ],
        "title": "FlagTarget"
      },
      "FlagUpdate": {
        "properties": {
          "type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Type"
          },
          "priority": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "due_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Due Date"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "private": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Private"
          }
        },
        "type": "object",
        "title": "FlagUpdate",
        "description": "Patch payload — every field optional. ``model_fields_set``\ndistinguishes \"omit\" from \"explicit null\" so we only patch what\nthe caller asked to change."
      },
      "ForgotPasswordPayload": {
        "properties": {
          "identifier": {
            "type": "string",
            "maxLength": 320,
            "minLength": 1,
            "title": "Identifier"
          }
        },
        "type": "object",
        "required": [
          "identifier"
        ],
        "title": "ForgotPasswordPayload",
        "description": "Public reset request — ``identifier`` is a username or email."
      },
      "GraphGroup": {
        "type": "string",
        "enum": [
          "days",
          "months",
          "years",
          "countries",
          "cities",
          "status",
          "tags",
          "rirs",
          "version",
          "asn",
          "firmware_version"
        ],
        "title": "GraphGroup"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ImportRangeRequest": {
        "properties": {
          "start_id": {
            "type": "integer",
            "minimum": 1,
            "title": "Start Id"
          },
          "end_id": {
            "type": "integer",
            "minimum": 1,
            "title": "End Id"
          },
          "force_refresh": {
            "type": "boolean",
            "title": "Force Refresh",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "start_id",
          "end_id"
        ],
        "title": "ImportRangeRequest",
        "description": "Body for ``POST /admin/measurements/imports/``. The ``end_id``\nis inclusive; the storage layer normalises swapped values."
      },
      "LoginPayload": {
        "properties": {
          "username": {
            "type": "string",
            "minLength": 1,
            "title": "Username"
          },
          "password": {
            "type": "string",
            "minLength": 1,
            "title": "Password"
          }
        },
        "type": "object",
        "required": [
          "username",
          "password"
        ],
        "title": "LoginPayload"
      },
      "MergeBody": {
        "properties": {
          "source": {
            "type": "string",
            "title": "Source",
            "description": "The duplicate URL to merge away (its _id)."
          },
          "into": {
            "type": "string",
            "title": "Into",
            "description": "The survivor URL it's a duplicate of (its _id)."
          }
        },
        "type": "object",
        "required": [
          "source",
          "into"
        ],
        "title": "MergeBody",
        "description": "Body for ``POST /admin/geofeeds/merge`` — mark ``source`` as a\nduplicate of ``into`` (the survivor)."
      },
      "NarrativeBody": {
        "properties": {
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model",
            "description": "Model alias — one of chat/reasoner (default chat). ``reasoner`` is slower and costs more budget but reasons harder about the likely mechanism."
          },
          "force": {
            "type": "boolean",
            "title": "Force",
            "description": "Regenerate even when a narrative already exists for this exact evidence + model. Without it an unchanged event is a cache hit and costs nothing.",
            "default": false
          }
        },
        "type": "object",
        "title": "NarrativeBody",
        "description": "Which model to narrate with, and whether to bypass the cache."
      },
      "PasswordChangePayload": {
        "properties": {
          "current_password": {
            "type": "string",
            "minLength": 1,
            "title": "Current Password"
          },
          "new_password": {
            "type": "string",
            "minLength": 8,
            "title": "New Password"
          }
        },
        "type": "object",
        "required": [
          "current_password",
          "new_password"
        ],
        "title": "PasswordChangePayload"
      },
      "PostRequest": {
        "properties": {
          "status": {
            "type": "string",
            "maxLength": 4096,
            "minLength": 1,
            "title": "Status"
          },
          "visibility": {
            "type": "string",
            "title": "Visibility",
            "default": "public"
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "PostRequest",
        "description": "Body for ``POST /admin/gotosocial/post``."
      },
      "PreferencesPatch": {
        "properties": {
          "preferences": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preferences"
          }
        },
        "type": "object",
        "title": "PreferencesPatch",
        "description": "Partial-update payload for the current user's preferences."
      },
      "PurgeResyncsSubmit": {
        "properties": {
          "dry_run": {
            "type": "boolean",
            "title": "Dry Run",
            "default": true
          }
        },
        "type": "object",
        "title": "PurgeResyncsSubmit",
        "description": "Body for ``POST /purge-resyncs``. ``dry_run`` (default) counts\nwithout deleting — always preview first."
      },
      "RangeBody": {
        "properties": {
          "since": {
            "type": "string",
            "title": "Since",
            "description": "YYYY-MM-DD inclusive lower bound."
          },
          "until": {
            "type": "string",
            "title": "Until",
            "description": "YYYY-MM-DD inclusive upper bound."
          }
        },
        "type": "object",
        "required": [
          "since",
          "until"
        ],
        "title": "RangeBody",
        "description": "Window-rebuild of historical snapshots. The span is server-\nclamped to ``AnchorsMeshTopologySettings.RANGE_REBUILD_MAX_DAYS``\nso a stray click can't fire an arbitrarily long backfill."
      },
      "RecomputeDayStatsRange": {
        "properties": {
          "since": {
            "type": "string",
            "title": "Since",
            "description": "inclusive start date, YYYY-MM-DD"
          },
          "until": {
            "type": "string",
            "title": "Until",
            "description": "inclusive end date, YYYY-MM-DD"
          }
        },
        "type": "object",
        "required": [
          "since",
          "until"
        ],
        "title": "RecomputeDayStatsRange",
        "description": "Body for ``POST /admin/measurements/daily/recompute-stats-range``.\n\nInclusive ``YYYY-MM-DD`` window; the server caps the span at\n:attr:`MeasurementsMeta.STATS_RECOMPUTE_RANGE_MAX_DAYS` so the\nsynchronous request stays bounded — chunk wider rebuilds."
      },
      "RedecodeRequest": {
        "properties": {
          "msm_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Msm Id"
          },
          "limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit"
          }
        },
        "type": "object",
        "title": "RedecodeRequest",
        "description": "Body for ``POST /admin/measurements/latest/redecode``.\n\nRe-runs the DNS decoder over already-cached DNS rows without\nre-fetching from RIPE. Useful after a decoder bug-fix or\nfeature addition."
      },
      "RegionCreate": {
        "properties": {
          "slug": {
            "type": "string",
            "maxLength": 32,
            "minLength": 2,
            "title": "Slug"
          },
          "description": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Description"
          },
          "countries": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "Countries"
          }
        },
        "type": "object",
        "required": [
          "slug",
          "description",
          "countries"
        ],
        "title": "RegionCreate"
      },
      "RegionUpdate": {
        "properties": {
          "description": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Description"
          },
          "countries": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "Countries"
          }
        },
        "type": "object",
        "required": [
          "description",
          "countries"
        ],
        "title": "RegionUpdate",
        "description": "Body of ``PUT /regions/{slug}/``. The slug is taken from the\npath and is immutable — only the mutable fields are accepted."
      },
      "RegisterPayload": {
        "properties": {
          "username": {
            "type": "string",
            "maxLength": 32,
            "minLength": 3,
            "title": "Username"
          },
          "password": {
            "type": "string",
            "minLength": 8,
            "title": "Password"
          }
        },
        "type": "object",
        "required": [
          "username",
          "password"
        ],
        "title": "RegisterPayload",
        "description": "Self-registration payload — always lands as a ``viewer``."
      },
      "ReplacementCreate": {
        "properties": {
          "candidate_anchor_id": {
            "type": "integer",
            "title": "Candidate Anchor Id"
          },
          "replacement_anchor_id": {
            "type": "integer",
            "title": "Replacement Anchor Id"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "type": "object",
        "required": [
          "candidate_anchor_id",
          "replacement_anchor_id"
        ],
        "title": "ReplacementCreate"
      },
      "ReplacementPatch": {
        "properties": {
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "type": "object",
        "title": "ReplacementPatch"
      },
      "ReplyBody": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "message"
        ],
        "title": "ReplyBody"
      },
      "ResetPasswordPayload": {
        "properties": {
          "token": {
            "type": "string",
            "minLength": 1,
            "title": "Token"
          },
          "new_password": {
            "type": "string",
            "minLength": 8,
            "title": "New Password"
          }
        },
        "type": "object",
        "required": [
          "token",
          "new_password"
        ],
        "title": "ResetPasswordPayload"
      },
      "RunBody": {
        "properties": {
          "date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date",
            "description": "YYYY-MM-DD; defaults to yesterday UTC."
          },
          "cc": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cc",
            "description": "Restrict to one country (e.g. \"NL\")."
          },
          "af": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Af",
            "description": "Restrict to one IP family: 4 or 6."
          }
        },
        "type": "object",
        "title": "RunBody",
        "description": "One-shot trigger. ``date`` defaults to yesterday (the same\ndefault the scheduled cron uses). ``cc`` / ``af`` restrict the\npass to a single country+AF; omit both to run the whole\neligible set."
      },
      "SeedFirstSeenSubmit": {
        "properties": {
          "since": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10
              },
              {
                "type": "null"
              }
            ],
            "title": "Since"
          },
          "until": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10
              },
              {
                "type": "null"
              }
            ],
            "title": "Until"
          }
        },
        "type": "object",
        "title": "SeedFirstSeenSubmit",
        "description": "Optional sub-range for the seed; both fields accept ``YYYY``\nor ``YYYY-MM-DD``. Omitted ⇒ infer min/max from the archive's\nextant rows (the common operator-after-deploy path)."
      },
      "SourceAddBody": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url",
            "description": "Geofeed CSV URL (http or https)."
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label",
            "description": "Optional display label; defaults to the hostname."
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Whether the daily cron should fetch this source.",
            "default": true
          },
          "verify_tls": {
            "type": "boolean",
            "title": "Verify Tls",
            "description": "Whether to validate the upstream TLS certificate. Set false for feeds whose operators let their cert expire (e.g. NTT's geofeed). Per-source opt-in only.",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "SourceAddBody",
        "description": "Body for ``POST /admin/geofeeds/sources/`` — admin add."
      },
      "SourceIn": {
        "properties": {
          "lat": {
            "type": "number",
            "title": "Lat"
          },
          "lon": {
            "type": "number",
            "title": "Lon"
          },
          "label": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          }
        },
        "type": "object",
        "required": [
          "lat",
          "lon"
        ],
        "title": "SourceIn"
      },
      "SourcePatchBody": {
        "properties": {
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          },
          "verify_tls": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verify Tls"
          }
        },
        "type": "object",
        "title": "SourcePatchBody"
      },
      "StatusBody": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status"
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "StatusBody"
      },
      "SubmitBody": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "page_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page Url"
          },
          "context": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "message"
        ],
        "title": "SubmitBody"
      },
      "SubscriptionCreate": {
        "properties": {
          "msm_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Msm Id"
          },
          "prb_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prb Id"
          },
          "type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Type"
          },
          "sink": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sink"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "default": true
          }
        },
        "type": "object",
        "title": "SubscriptionCreate"
      },
      "SubscriptionPatch": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          }
        },
        "type": "object",
        "required": [
          "enabled"
        ],
        "title": "SubscriptionPatch"
      },
      "TargetCreateBody": {
        "properties": {
          "kind": {
            "type": "string",
            "title": "Kind",
            "description": "One of ('host', 'ip', 'prefix', 'asn')."
          },
          "value": {
            "type": "string",
            "title": "Value"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "runbook_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Runbook Url"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "kind",
          "value"
        ],
        "title": "TargetCreateBody"
      },
      "TargetPatchBody": {
        "properties": {
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "runbook_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Runbook Url"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          }
        },
        "type": "object",
        "title": "TargetPatchBody"
      },
      "UpdateUserPayload": {
        "properties": {
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          }
        },
        "type": "object",
        "title": "UpdateUserPayload"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "VerifyRangeRequest": {
        "properties": {
          "since": {
            "type": "string",
            "title": "Since",
            "description": "inclusive start date, YYYY-MM-DD"
          },
          "until": {
            "type": "string",
            "title": "Until",
            "description": "inclusive end date, YYYY-MM-DD"
          }
        },
        "type": "object",
        "required": [
          "since",
          "until"
        ],
        "title": "VerifyRangeRequest",
        "description": "Body for ``POST /admin/measurements/daily/verify-range``.\n\nInclusive ``YYYY-MM-DD`` window. Capped server-side at\n:attr:`MeasurementsMeta.VERIFY_RANGE_MAX_DAYS`."
      },
      "api__routers__anchors_health__ClearCollectionsRequest": {
        "properties": {
          "confirm": {
            "type": "boolean",
            "title": "Confirm",
            "default": false
          }
        },
        "type": "object",
        "title": "ClearCollectionsRequest",
        "description": "Confirmation envelope for the destructive clear-collections\naction. Operator must POST ``{\"confirm\": true}`` explicitly —\nwe treat a missing or false ``confirm`` as a misclick."
      },
      "api__routers__anchors_health__RecheckStaleRequest": {
        "properties": {
          "max_anchors": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Anchors"
          }
        },
        "type": "object",
        "title": "RecheckStaleRequest",
        "description": "Optional cap for the bulk burst. Omitted ⇒ the server default\n(``AnchorsDnsSettings.MANUAL_MAX``); any value is server-clamped\nto that ceiling so a single call can never run unbounded."
      },
      "api__routers__anchors_mesh_health__ClearCollectionsRequest": {
        "properties": {
          "confirm": {
            "type": "boolean",
            "title": "Confirm",
            "default": false
          }
        },
        "type": "object",
        "title": "ClearCollectionsRequest",
        "description": "Confirmation envelope for the destructive clear-collections\naction. Operator must POST ``{\"confirm\": true}`` explicitly —\na missing or false ``confirm`` is treated as a misclick."
      },
      "api__routers__as_population__BackfillStaleStatsSubmit": {
        "properties": {
          "max_days": {
            "type": "integer",
            "minimum": 1,
            "title": "Max Days",
            "description": "one-shot burst cap (server-clamped)",
            "default": 1000
          }
        },
        "type": "object",
        "title": "BackfillStaleStatsSubmit"
      },
      "api__routers__comments__CountsRequest": {
        "properties": {
          "targets": {
            "items": {
              "$ref": "#/components/schemas/CommentTarget"
            },
            "type": "array",
            "title": "Targets"
          }
        },
        "type": "object",
        "required": [
          "targets"
        ],
        "title": "CountsRequest",
        "description": "Body for ``POST /comments/counts/``. A list of ``(collection,\ndoc_id)`` pairs the UI wants comment counts for. POST rather than\nGET so the payload can carry a long list without bumping\nquery-string limits — same shape as ``/flags/counts/``."
      },
      "api__routers__enrichment__RefreshBody": {
        "properties": {
          "entity_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entity Id",
            "description": "Ledger _id, e.g. \"ip:8.8.8.8\"."
          },
          "type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Type",
            "description": "Restrict to \"ip\" / \"asn\" / \"host\"."
          },
          "hard": {
            "type": "boolean",
            "title": "Hard",
            "description": "Pass refresh=True to the underlying get_or_refresh (re-fetch every upstream, not just the missing bits).",
            "default": false
          }
        },
        "type": "object",
        "title": "RefreshBody",
        "description": "Force re-enrichment of a single entity, a whole type, or\neverything. Exactly one selector is honoured (entity_id wins, then\ntype, else all)."
      },
      "api__routers__events_connections__BackfillStaleStatsSubmit": {
        "properties": {
          "max_days": {
            "type": "integer",
            "minimum": 1,
            "title": "Max Days",
            "description": "one-shot burst cap (server-clamped)",
            "default": 1000
          }
        },
        "type": "object",
        "title": "BackfillStaleStatsSubmit",
        "description": "Body for ``POST /daily/backfill-stale-stats``.\n\n``max_days`` is the one-shot burst cap (default a large burst;\nserver-clamped to ``_BACKFILL_BURST_CEILING``). Idempotent and\nsafe to spam — re-running over fresh days is a no-op write."
      },
      "api__routers__events_connections__BackfillSubmit": {
        "properties": {
          "start_ts": {
            "type": "integer",
            "title": "Start Ts",
            "description": "Unix-seconds for the inclusive scan-window start."
          },
          "stop_ts": {
            "type": "integer",
            "title": "Stop Ts",
            "description": "Unix-seconds for the inclusive scan-window stop."
          }
        },
        "type": "object",
        "required": [
          "start_ts",
          "stop_ts"
        ],
        "title": "BackfillSubmit",
        "description": "Request body for ``POST /backfill``."
      },
      "api__routers__events_connections__RecomputeStatsRangeSubmit": {
        "properties": {
          "since": {
            "type": "string",
            "title": "Since",
            "description": "inclusive start date, YYYY-MM-DD"
          },
          "until": {
            "type": "string",
            "title": "Until",
            "description": "inclusive end date, YYYY-MM-DD"
          }
        },
        "type": "object",
        "required": [
          "since",
          "until"
        ],
        "title": "RecomputeStatsRangeSubmit",
        "description": "Body for ``POST /daily/recompute-stats-range``.\n\nInclusive ``YYYY-MM-DD`` window; the server caps the span at\n:attr:`EventsConnections.STATS_RECOMPUTE_RANGE_MAX_DAYS` so the\nsynchronous request stays bounded — chunk wider rebuilds."
      },
      "api__routers__events_connections__VerifyDaysRangeSubmit": {
        "properties": {
          "since": {
            "type": "string",
            "title": "Since",
            "description": "inclusive start date, YYYY-MM-DD"
          },
          "until": {
            "type": "string",
            "title": "Until",
            "description": "inclusive end date, YYYY-MM-DD"
          }
        },
        "type": "object",
        "required": [
          "since",
          "until"
        ],
        "title": "VerifyDaysRangeSubmit",
        "description": "Request body for ``POST /daily/verify-range``.\n\nInclusive ``YYYY-MM-DD`` window. Range size is capped server-side\n(see :attr:`EventsConnections.VERIFY_RANGE_MAX_DAYS`) so the\nsynchronous request fits inside the standard HTTP timeout."
      },
      "api__routers__events_uptimes__BackfillStaleStatsSubmit": {
        "properties": {
          "max_days": {
            "type": "integer",
            "minimum": 1,
            "title": "Max Days",
            "description": "one-shot burst cap (server-clamped)",
            "default": 1000
          }
        },
        "type": "object",
        "title": "BackfillStaleStatsSubmit",
        "description": "Body for ``POST /daily/backfill-stale-stats``.\n\n``max_days`` is the one-shot burst cap (default a large burst;\nserver-clamped to ``_BACKFILL_BURST_CEILING``). Idempotent and\nsafe to spam — re-running over fresh days is a no-op write."
      },
      "api__routers__events_uptimes__BackfillSubmit": {
        "properties": {
          "start_ts": {
            "type": "integer",
            "title": "Start Ts",
            "description": "Unix-seconds for the inclusive scan-window start."
          },
          "stop_ts": {
            "type": "integer",
            "title": "Stop Ts",
            "description": "Unix-seconds for the inclusive scan-window stop."
          }
        },
        "type": "object",
        "required": [
          "start_ts",
          "stop_ts"
        ],
        "title": "BackfillSubmit",
        "description": "Request body for ``POST /backfill``."
      },
      "api__routers__events_uptimes__RecomputeStatsRangeSubmit": {
        "properties": {
          "since": {
            "type": "string",
            "title": "Since",
            "description": "inclusive start date, YYYY-MM-DD"
          },
          "until": {
            "type": "string",
            "title": "Until",
            "description": "inclusive end date, YYYY-MM-DD"
          }
        },
        "type": "object",
        "required": [
          "since",
          "until"
        ],
        "title": "RecomputeStatsRangeSubmit",
        "description": "Body for ``POST /daily/recompute-stats-range``.\n\nInclusive ``YYYY-MM-DD`` window; the server caps the span at\n:attr:`EventsUptimes.STATS_RECOMPUTE_RANGE_MAX_DAYS` so the\nsynchronous request stays bounded — chunk wider rebuilds."
      },
      "api__routers__events_uptimes__VerifyDaysRangeSubmit": {
        "properties": {
          "since": {
            "type": "string",
            "title": "Since",
            "description": "inclusive start date, YYYY-MM-DD"
          },
          "until": {
            "type": "string",
            "title": "Until",
            "description": "inclusive end date, YYYY-MM-DD"
          }
        },
        "type": "object",
        "required": [
          "since",
          "until"
        ],
        "title": "VerifyDaysRangeSubmit",
        "description": "Request body for ``POST /daily/verify-range``.\n\nInclusive ``YYYY-MM-DD`` window. Range size is capped server-side\n(see :attr:`EventsUptimes.VERIFY_RANGE_MAX_DAYS`) so the\nsynchronous request fits inside the standard HTTP timeout."
      },
      "api__routers__flags__CountsRequest": {
        "properties": {
          "targets": {
            "items": {
              "$ref": "#/components/schemas/FlagTarget"
            },
            "type": "array",
            "title": "Targets"
          }
        },
        "type": "object",
        "required": [
          "targets"
        ],
        "title": "CountsRequest",
        "description": "Body for ``POST /flags/counts/``. A list of ``(collection,\ndoc_id)`` pairs the UI wants counts for. POST rather than GET so\nthe payload can carry a long list without bumping query-string\nlimits."
      },
      "api__routers__geofeeds__RefreshBody": {
        "properties": {
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "all": {
            "type": "boolean",
            "title": "All",
            "default": false
          }
        },
        "type": "object",
        "title": "RefreshBody",
        "description": "Body for ``POST /admin/geofeeds/refresh``. Exactly one of\n``url`` (one source) or ``all`` must be set."
      },
      "api__routers__geonames__ImportSubmit": {
        "properties": {
          "dataset": {
            "type": "string",
            "title": "Dataset",
            "description": "One of the keys in DATASETS"
          },
          "skip_if_unchanged": {
            "type": "boolean",
            "title": "Skip If Unchanged",
            "description": "When true, the worker compares the upstream Last-Modified header against the most recent successful import for the same dataset and short-circuits when they match.",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "dataset"
        ],
        "title": "ImportSubmit",
        "description": "Request body for ``POST /imports/run``."
      },
      "api__routers__measurements_latest__RefreshBody": {
        "properties": {
          "msm_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Msm Id",
            "description": "Single measurement id to make due now."
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status",
            "description": "Restrict a bulk requeue to one status bucket (\"pending\" / \"running\" / \"failed\" / \"dead\"). Ignored when ``msm_id`` is given."
          }
        },
        "type": "object",
        "title": "RefreshBody",
        "description": "Force a single row or a status bucket to be due now.\n\nExactly one selector is honoured: ``msm_id`` wins, then ``status``\nrestricts a bulk requeue, else everything non-``done`` is flipped.\n``done`` rows are intentionally not touched — terminal results\ndon't change."
      },
      "api__routers__peeringdb__ImportSubmit": {
        "properties": {
          "endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Endpoint",
            "description": "One of the 14 PeeringDB endpoint keys (see GET /peeringdb/endpoints/)."
          },
          "all": {
            "type": "boolean",
            "title": "All",
            "description": "Run all 14 endpoints in turn.",
            "default": false
          }
        },
        "type": "object",
        "title": "ImportSubmit",
        "description": "Request body for ``POST /imports/run``.\n\nEither ``endpoint`` (single-endpoint import) or ``all: true``\n(full sweep). Validated server-side — one and only one must be\nset."
      },
      "api__routers__probes_archive__BackfillStaleStatsSubmit": {
        "properties": {
          "max_days": {
            "type": "integer",
            "minimum": 1,
            "title": "Max Days",
            "description": "one-shot burst cap (server-clamped)",
            "default": 1000
          }
        },
        "type": "object",
        "title": "BackfillStaleStatsSubmit",
        "description": "Body for ``POST /daily/backfill-stale-stats``.\n\n``max_days`` is the one-shot burst cap (default a large burst;\nserver-clamped to ``_BACKFILL_BURST_CEILING``). Idempotent and\nsafe to spam — re-running over fresh days is a no-op write."
      },
      "api__routers__probes_archive__BackfillSubmit": {
        "properties": {
          "since": {
            "type": "string",
            "title": "Since",
            "description": "inclusive start date, YYYY-MM-DD"
          },
          "until": {
            "type": "string",
            "title": "Until",
            "description": "inclusive end date, YYYY-MM-DD"
          },
          "only_missing": {
            "type": "boolean",
            "title": "Only Missing",
            "description": "skip dates with an existing successful daily-summary row",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "since",
          "until"
        ],
        "title": "BackfillSubmit",
        "description": "Request body for ``POST /daily/backfill``.\n\nInclusive ``YYYY-MM-DD`` window. ``only_missing`` filters out\ndates that already have a successful daily-summary row, leaving\n``failed`` / ``running`` / ``queued`` rows in scope (those are\nthe ones operators most often want to retry or unstick)."
      },
      "api__routers__probes_archive__RecomputeStatsRangeSubmit": {
        "properties": {
          "since": {
            "type": "string",
            "title": "Since",
            "description": "inclusive start date, YYYY-MM-DD"
          },
          "until": {
            "type": "string",
            "title": "Until",
            "description": "inclusive end date, YYYY-MM-DD"
          }
        },
        "type": "object",
        "required": [
          "since",
          "until"
        ],
        "title": "RecomputeStatsRangeSubmit",
        "description": "Request body for ``POST /daily/recompute-stats-range``.\n\nInclusive ``YYYY-MM-DD`` window. Range size is capped server-side\n(see :attr:`ProbesArchive.RECOMPUTE_RANGE_MAX_DAYS`) so the\nsynchronous request fits inside the long-running HTTP timeout the\nfrontend uses."
      },
      "api__routers__probes_health__ClearCollectionsRequest": {
        "properties": {
          "confirm": {
            "type": "boolean",
            "title": "Confirm",
            "default": false
          }
        },
        "type": "object",
        "title": "ClearCollectionsRequest",
        "description": "Confirmation envelope for the destructive clear action — a\nmissing/false ``confirm`` is treated as a misclick."
      },
      "api__routers__probes_health__RecheckStaleRequest": {
        "properties": {
          "max_probes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Probes"
          }
        },
        "type": "object",
        "title": "RecheckStaleRequest",
        "description": "Optional cap for the bulk burst. Omitted ⇒ the server default\n(``ProbeMeasurementHealthSettings.MANUAL_MAX``); any value is\nserver-clamped to that ceiling so one call can't run unbounded."
      }
    },
    "securitySchemes": {
      "APIKeyQuery": {
        "type": "apiKey",
        "in": "query",
        "name": "api-key"
      },
      "APIKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    }
  },
  "tags": [
    {
      "name": "outages",
      "description": "RIPE Atlas controller and network (ASN) outages: probes disconnecting together, detected live or reconstructed from past connection events. Public; no probe identities."
    },
    {
      "name": "dnsmon",
      "description": "Retrieve information about DNSMON anchors"
    },
    {
      "name": "ASN",
      "description": "Retrieve information about probes, measurements or anchors by ASN"
    },
    {
      "name": "countries",
      "description": "Retrieve information about probes, measurements or anchors by country"
    },
    {
      "name": "graphs",
      "description": "Graphing API endpoints"
    },
    {
      "name": "probes",
      "description": "Retrieve information about RIPE Atlas probes"
    },
    {
      "name": "anchors",
      "description": "Retrieve information about RIPE Atlas anchors"
    },
    {
      "name": "measurements",
      "description": "Retrieve information about RIPE Atlas measurements"
    },
    {
      "name": "latest",
      "description": "Retrieve the most recent records"
    },
    {
      "name": "locations",
      "description": "Retrieve information about probes by location"
    },
    {
      "name": "problems",
      "description": "These paths show problems with RIPE Atlas probes and anchors"
    },
    {
      "name": "tags",
      "description": "Retrieve information about RIPE Atlas tags"
    },
    {
      "name": "eyeballs",
      "description": "Retrieve information about eyeball data for a specific country and date"
    },
    {
      "name": "test",
      "description": "Test paths"
    },
    {
      "name": "ris",
      "description": "Retrieve information about RIS data"
    },
    {
      "name": "archive",
      "description": "Retrieve historical data"
    },
    {
      "name": "mongo",
      "description": "Retrieve information from the MongoDB database"
    }
  ]
}
