{
  "components": {
    "schemas": {
      "AdvertIntervalAnalyticsResponse": {
        "type": "object",
        "description": "Mesh-wide estimated advert intervals (#245 M2), see GET /api/analytics/advert-intervals.",
        "properties": {
          "by_region": {
            "type": "array",
            "description": "Per region of the observers that heard the node's sampled adverts, largest first; a node heard in two regions counts in both, one heard by no observer with a region under \"unknown\".",
            "items": {
              "$ref": "#/components/schemas/AdvertIntervalGroup"
            }
          },
          "by_role": {
            "type": "array",
            "description": "Per normalized role (empty: unknown), largest first.",
            "items": {
              "$ref": "#/components/schemas/AdvertIntervalGroup"
            }
          },
          "flood": {
            "$ref": "#/components/schemas/AdvertIntervalClassSummary"
          },
          "flood_re_arm": {
            "$ref": "#/components/schemas/AdvertIntervalFloodReArm"
          },
          "min_confidence": {
            "type": "string",
            "description": "Least confidence an estimate needs to be in buckets.",
            "enum": [
              "medium"
            ]
          },
          "nodes": {
            "type": "integer",
            "description": "Nodes counted (after the region/area filter).",
            "minimum": 0
          },
          "outliers": {
            "type": "array",
            "description": "Most frequent first (median_gap_s ascending), at most 50.",
            "items": {
              "$ref": "#/components/schemas/AdvertIntervalOutlier"
            }
          },
          "outliers_total": {
            "type": "integer",
            "description": "All outlier rows before the limit.",
            "minimum": 0
          },
          "outliers_withheld": {
            "type": "integer",
            "description": "Outlier rows left out of outliers because the instance hides their identity (checked at serve time, including observer and inactive-node names); still counted in outliers_total (#896).",
            "minimum": 0
          },
          "regions_truncated": {
            "type": "boolean",
            "description": "true when by_region holds only the 50 largest regions."
          },
          "scan": {
            "$ref": "#/components/schemas/AdvertIntervalScanInfo"
          },
          "window": {
            "type": "integer",
            "description": "Most adverts per class and node estimated from (20, as node detail)."
          },
          "zero_hop": {
            "$ref": "#/components/schemas/AdvertIntervalClassSummary"
          }
        }
      },
      "AdvertIntervalBucket": {
        "type": "object",
        "properties": {
          "interval_s": {
            "type": "integer",
            "description": "The snapped firmware value, or an estimate outside the settable range rounded to the hour (flood) or minute (zero-hop)."
          },
          "nodes": {
            "type": "integer",
            "minimum": 0
          },
          "snapped": {
            "type": "boolean",
            "description": "false for estimates outside the settable range."
          }
        }
      },
      "AdvertIntervalBucketConflict": {
        "type": "object",
        "description": "409 of GET /api/analytics/advert-intervals/bucket.",
        "properties": {
          "error": {
            "type": "string"
          },
          "generated_at": {
            "type": "string",
            "description": "The published snapshot's generated_at."
          }
        }
      },
      "AdvertIntervalBucketMember": {
        "type": "object",
        "properties": {
          "confidence": {
            "type": "string",
            "enum": [
              "high",
              "medium"
            ]
          },
          "gaps_used": {
            "type": "integer",
            "description": "Gaps between them that fit the interval.",
            "minimum": 0
          },
          "interval_s": {
            "type": "integer",
            "description": "The node's own estimate; in an unsnapped bucket not rounded like the bucket."
          },
          "name": {
            "type": "string"
          },
          "public_key": {
            "type": "string"
          },
          "regions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "role": {
            "type": "string"
          },
          "samples": {
            "type": "integer",
            "description": "Adverts the estimate used.",
            "minimum": 0
          },
          "snapped": {
            "type": "boolean"
          }
        }
      },
      "AdvertIntervalBucketResponse": {
        "type": "object",
        "description": "The nodes of one distribution bucket (#896), see GET /api/analytics/advert-intervals/bucket.",
        "properties": {
          "class": {
            "type": "string",
            "enum": [
              "flood",
              "zero_hop"
            ]
          },
          "generated_at": {
            "type": "string",
            "description": "scan.generated_at of the snapshot served; pass it as snapshot= for further pages."
          },
          "interval_s": {
            "type": "integer",
            "description": "The bucket's interval_s, as requested."
          },
          "limit": {
            "type": "integer",
            "description": "Page size served (default 50, at most 200).",
            "minimum": 0
          },
          "members": {
            "type": "array",
            "description": "At most limit visible members from offset; [] past the end.",
            "items": {
              "$ref": "#/components/schemas/AdvertIntervalBucketMember"
            }
          },
          "nodes": {
            "type": "integer",
            "description": "The bucket's count in this snapshot and filter (the histogram's).",
            "minimum": 0
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "snapped": {
            "type": "boolean"
          },
          "visible": {
            "type": "integer",
            "description": "Listable members over all pages.",
            "minimum": 0
          },
          "withheld": {
            "type": "integer",
            "description": "nodes - visible: hidden identities, never listed.",
            "minimum": 0
          }
        }
      },
      "AdvertIntervalClassSummary": {
        "type": "object",
        "description": "One route class: every counted node is in exactly one of estimated, low_confidence, irregular, too_few and not_observed (node detail's status and confidence).",
        "properties": {
          "buckets": {
            "type": "array",
            "description": "By interval_s ascending.",
            "items": {
              "$ref": "#/components/schemas/AdvertIntervalBucket"
            }
          },
          "estimated": {
            "type": "integer",
            "description": "Medium or high confidence estimates; these are in buckets.",
            "minimum": 0
          },
          "irregular": {
            "type": "integer",
            "description": "Enough adverts, but no interval fits.",
            "minimum": 0
          },
          "low_confidence": {
            "type": "integer",
            "description": "Estimates with low confidence.",
            "minimum": 0
          },
          "not_observed": {
            "type": "integer",
            "description": "No adverts of the class. For zero-hop: off, or no observer in direct range.",
            "minimum": 0
          },
          "too_few": {
            "type": "integer",
            "description": "Fewer than 3 adverts.",
            "minimum": 0
          }
        }
      },
      "AdvertIntervalEstimate": {
        "type": "object",
        "description": "One route class of NodeAdvertIntervals.",
        "properties": {
          "confidence": {
            "type": "string",
            "description": "high: \u003e= 6 fitting gaps and \u003e= 75 % of the non-short gaps fit; medium: \u003e= 3 and \u003e= 50 %; low: fewer; none: under 3 adverts or no interval seen at least twice.",
            "enum": [
              "high",
              "medium",
              "low",
              "none"
            ]
          },
          "gaps_used": {
            "type": "integer",
            "description": "Gaps between the samples that fit 1-4x the interval.",
            "minimum": 0
          },
          "interval_s": {
            "type": "integer",
            "description": "Estimated interval in seconds, snapped when snapped is true; null when confidence is none.",
            "nullable": true
          },
          "last_advert": {
            "type": "string",
            "description": "RFC3339 first_seen of the newest advert in the class; null when there is none.",
            "nullable": true
          },
          "raw_interval_s": {
            "type": "integer",
            "description": "The median before snapping; null when confidence is none.",
            "nullable": true
          },
          "samples": {
            "type": "integer",
            "description": "Adverts used; after a raised interval, the adverts since the change.",
            "minimum": 0
          },
          "snapped": {
            "type": "boolean",
            "description": "true when the estimate is within 10 % of the firmware's settable range and interval_s is the nearest settable value."
          },
          "status": {
            "type": "string",
            "description": "estimated: interval_s is set; none_observed: no adverts of the class; too_few: under 3 adverts; irregular: enough adverts but no interval fits.",
            "enum": [
              "estimated",
              "none_observed",
              "too_few",
              "irregular"
            ]
          }
        }
      },
      "AdvertIntervalFloodReArm": {
        "type": "object",
        "description": "A flood advert re-arms the zero-hop timer (MeshCore examples/simple_repeater/MyMesh.cpp:1294-1306), which shapes the zero-hop reading (#247 review F7/N4). Both counts compare medium/high estimates only.",
        "properties": {
          "zero_hop_maybe_suppressed": {
            "type": "integer",
            "description": "Zero-hop not observed and flood interval at most 240 min: with advert.interval \u003e= flood the zero-hop timer never fires.",
            "minimum": 0
          },
          "zero_hop_paced_by_flood": {
            "type": "integer",
            "description": "Zero-hop estimate equal to the flood interval (within 10 %): with zero-hop Z \u003c flood F \u003c= 2Z every zero-hop gap is F, so the setting is between F/2 and F.",
            "minimum": 0
          }
        }
      },
      "AdvertIntervalGroup": {
        "type": "object",
        "properties": {
          "flood": {
            "$ref": "#/components/schemas/AdvertIntervalClassSummary"
          },
          "key": {
            "type": "string",
            "description": "Role, or region code (\"unknown\": no observer with a region)."
          },
          "nodes": {
            "type": "integer",
            "minimum": 0
          },
          "zero_hop": {
            "$ref": "#/components/schemas/AdvertIntervalClassSummary"
          }
        }
      },
      "AdvertIntervalOutlier": {
        "type": "object",
        "description": "A node advertising more often than the class's shortest timer setting allows (median gap of its sampled adverts under 3 h flood or 60 min zero-hop, less 10 %: manual or scripted adverts, a reboot loop, other firmware), or with a zero-hop estimate at the 2-minute new-install default. One row per node and class.",
        "properties": {
          "class": {
            "type": "string",
            "enum": [
              "flood",
              "zero_hop"
            ]
          },
          "interval_s": {
            "type": "integer",
            "description": "The class estimate (AdvertIntervalEstimate.interval_s).",
            "nullable": true
          },
          "median_gap_s": {
            "type": "integer",
            "description": "Median gap between the class's sampled adverts, in seconds."
          },
          "name": {
            "type": "string"
          },
          "public_key": {
            "type": "string"
          },
          "reason": {
            "type": "string",
            "enum": [
              "flood_faster_than_settable",
              "zero_hop_faster_than_settable",
              "zero_hop_new_install_default"
            ]
          },
          "regions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "role": {
            "type": "string"
          },
          "samples": {
            "type": "integer",
            "description": "Adverts the class estimate used.",
            "minimum": 0
          }
        }
      },
      "AdvertIntervalScanInfo": {
        "type": "object",
        "properties": {
          "generated_at": {
            "type": "string",
            "description": "RFC3339 time of the pass the response comes from."
          },
          "rows": {
            "type": "integer",
            "description": "ADVERT rows the pass read.",
            "minimum": 0
          },
          "truncated": {
            "type": "boolean",
            "description": "true when the pass stopped at its row cap (1000000, newest first)."
          }
        }
      },
      "AdvertRouteCounts": {
        "type": "object",
        "properties": {
          "flood": {
            "type": "integer",
            "minimum": 0
          },
          "mixed": {
            "type": "integer",
            "minimum": 0
          },
          "unknown": {
            "type": "integer",
            "minimum": 0
          },
          "zero_hop": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "AllObserverNeighborsEntry": {
        "description": "One observer's firmware-reported direct neighbor, flattened with which observer it came from.",
        "properties": {
          "neighborName": {
            "description": "Neighbor display name, null when the pubkey doesn't resolve to a known node.",
            "nullable": true,
            "type": "string"
          },
          "neighborPubkey": {
            "description": "The neighbor's pubkey.",
            "type": "string"
          },
          "neighborRole": {
            "nullable": true,
            "type": "string"
          },
          "observerIata": {
            "description": "Observer's IATA region code, when set.",
            "nullable": true,
            "type": "string"
          },
          "observerId": {
            "description": "The reporting observer's ID.",
            "type": "string"
          },
          "observerName": {
            "description": "Observer display name, null when unresolved.",
            "nullable": true,
            "type": "string"
          },
          "reportedAt": {
            "description": "RFC3339 timestamp of the /neighbors report this row came from.",
            "type": "string"
          },
          "scopes": {
            "description": "Null unless the neighbor's OTA scope query responded (status=\"responded\").",
            "nullable": true,
            "type": "string"
          },
          "seenViaPackets": {
            "description": "Cross-references the packet-path-inferred neighbor_edges graph -- false means this firmware-confirmed neighbor has never had a resolved packet path to the observer (possible coverage gap or packet loss, not necessarily a fault).",
            "type": "boolean"
          },
          "status": {
            "description": "The /neighbors report's status for this entry (e.g. \"responded\", \"timeout\").",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AllObserverNeighborsResponse": {
        "description": "Every observer's reported direct neighbors, network-wide (Tools \u003e Observer Neighbors). Empty (not an error) when no observer has ever sent a /neighbors report.",
        "properties": {
          "neighbors": {
            "items": {
              "$ref": "#/components/schemas/AllObserverNeighborsEntry"
            },
            "type": "array"
          },
          "unknownScopes": {
            "description": "Region-scope names observed in the wild that aren't part of this deployment's configured hashRegions, ranked by how many distinct neighbors reported them.",
            "items": {
              "$ref": "#/components/schemas/UnknownScopeEntry"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ApiError": {
        "type": "object",
        "description": "The shared error body every /api/* error answer uses (#266): a single human-readable message. Status codes carry the machine-readable meaning, not this string.",
        "properties": {
          "error": {
            "type": "string"
          }
        }
      },
      "AreaAnalyticsResponse": {
        "description": "Node density/health, cross-area bridge nodes, and position-fix coverage per configured Area. When estimatedPositions.enabled is false, returns estimatedPositionsEnabled:false and real density/bridgeNodes/unpositionedTotal only; positionGaps, estimatedNodes, and unpositionedNoNeighborFix are omitted because they were not evaluated.",
        "properties": {
          "bridgeNodes": {
            "description": "Top cross-area bridge nodes, ranked by how many other areas they reach.",
            "items": {
              "$ref": "#/components/schemas/AreaBridgeNode"
            },
            "type": "array"
          },
          "density": {
            "items": {
              "$ref": "#/components/schemas/AreaDensity"
            },
            "type": "array"
          },
          "estimatedNodes": {
            "description": "Flat, network-wide list of every node behind positionGaps' approximated counts, with actual estimated coordinates for plotting on a map.",
            "items": {
              "$ref": "#/components/schemas/EstimatedAreaNode"
            },
            "type": "array"
          },
          "estimatedPositionsEnabled": {
            "type": "boolean",
            "description": "Present as false only when neighbor-derived position estimation is disabled by the operator."
          },
          "positionGaps": {
            "items": {
              "$ref": "#/components/schemas/AreaPositionGap"
            },
            "type": "array"
          },
          "unpositionedNoNeighborFix": {
            "description": "The subset of unpositionedTotal that also has no positioned neighbor to estimate from -- can't be placed even approximately, so absent from every area's positionGaps.approximated.",
            "type": "integer"
          },
          "unpositionedTotal": {
            "description": "Every node with no real GPS fix, regardless of area.",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "AreaBridgeNode": {
        "description": "One node whose packet-derived neighbor_edges reach into at least one other configured area than its own -- distinct from the network-wide, area-unaware bridge_score betweenness centrality.",
        "properties": {
          "areaKey": {
            "description": "This node's own single most-specific area.",
            "type": "string"
          },
          "edgeCount": {
            "description": "Number of neighbor_edges reaching into a different area than this node's own.",
            "type": "integer"
          },
          "label": {
            "description": "That area's display label.",
            "type": "string"
          },
          "name": {
            "description": "Display name, falling back to the raw pubkey when unresolved.",
            "type": "string"
          },
          "otherAreaCount": {
            "description": "Number of distinct other areas reached.",
            "type": "integer"
          },
          "otherAreas": {
            "description": "Display labels of every other area reached.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "publicKey": {
            "description": "The node's pubkey.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AreaDensity": {
        "description": "One configured area's node count, active/degraded/silent health breakdown, and role mix. Multi-membership: a node in a sub-area also counts toward its parent region.",
        "properties": {
          "active": {
            "description": "Nodes heard within their role's active threshold.",
            "type": "integer"
          },
          "areaKey": {
            "description": "The area's config key.",
            "type": "string"
          },
          "degraded": {
            "description": "Nodes heard within their role's degraded threshold but not active.",
            "type": "integer"
          },
          "label": {
            "description": "The area's display label.",
            "type": "string"
          },
          "roleCounts": {
            "additionalProperties": {
              "type": "integer"
            },
            "description": "Node count per role string.",
            "type": "object"
          },
          "silent": {
            "description": "Nodes not heard within either threshold.",
            "type": "integer"
          },
          "total": {
            "description": "Total nodes with a real GPS fix inside this area (or any of its sub-areas).",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "AreaGrowth": {
        "properties": {
          "count": {
            "description": "New nodes in this area within the digest window.",
            "type": "integer"
          },
          "label": {
            "description": "The area's display label.",
            "type": "string"
          },
          "nodes": {
            "description": "Every new node counted toward this area, newest first.",
            "items": {
              "$ref": "#/components/schemas/AreaNodeRef"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "AreaNodeRef": {
        "properties": {
          "firstSeen": {
            "description": "RFC3339 timestamp the node was first seen.",
            "type": "string"
          },
          "name": {
            "description": "Display name, when known.",
            "type": "string"
          },
          "publicKey": {
            "description": "The node's public key.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AreaPositionGap": {
        "description": "One configured area's position-fix coverage: nodes with a real GPS fix vs. nodes only placeable via nearestPositionedNeighbor's estimate.",
        "properties": {
          "approximated": {
            "description": "Nodes with no GPS fix whose neighbor-centroid estimate landed in this area.",
            "type": "integer"
          },
          "areaKey": {
            "description": "The area's config key.",
            "type": "string"
          },
          "label": {
            "description": "The area's display label.",
            "type": "string"
          },
          "realFix": {
            "description": "Nodes in this area with an actual reported GPS position.",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "BulkHealthEntry": {
        "type": "object",
        "properties": {
          "directObservers": {
            "type": "array",
            "description": "Observers that received the node's own transmission, most direct receptions first.",
            "items": {
              "$ref": "#/components/schemas/HeardDirectObserver"
            }
          },
          "lat": {
            "type": "number",
            "nullable": true
          },
          "lon": {
            "type": "number",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "public_key": {
            "type": "string"
          },
          "relayObservers": {
            "type": "array",
            "description": "Every other observer of the node's transmissions, most transmissions first.",
            "items": {
              "$ref": "#/components/schemas/HeardRelayObserver"
            }
          },
          "role": {
            "type": "string",
            "nullable": true
          },
          "stats": {
            "type": "object",
            "properties": {
              "avgHops": {
                "type": "integer",
                "description": "Node health only: rounded mean path length of the node's transmissions."
              },
              "avgSnr": {
                "type": "number",
                "description": "Mean SNR (dB) over the node's direct receptions (HeardDirectObserver); null without one. Other copies carry the SNR of whichever node the observer heard.",
                "nullable": true
              },
              "lastAdvert": {
                "type": "string",
                "description": "Newest own ADVERT: from the packet-store window, else the newest own ADVERT in the database (#848).",
                "nullable": true
              },
              "lastAdvertSource": {
                "type": "string",
                "description": "Where lastAdvert came from: window (in-memory packet store) or db (database, outside the window). Omitted when lastAdvert is null (#848)."
              },
              "lastHeard": {
                "type": "string",
                "description": "Newest own ADVERT or unambiguous relay evidence (#64).",
                "nullable": true
              },
              "packetsToday": {
                "type": "integer",
                "minimum": 0
              },
              "totalObservations": {
                "type": "integer",
                "minimum": 0
              },
              "totalPackets": {
                "type": "integer",
                "description": "Same as totalTransmissions (backward compatibility).",
                "minimum": 0
              },
              "totalTransmissions": {
                "type": "integer",
                "minimum": 0
              }
            }
          }
        }
      },
      "BulkHealthResponse": {
        "type": "array",
        "description": "A bare array, not wrapped in an object.",
        "items": {
          "$ref": "#/components/schemas/BulkHealthEntry"
        }
      },
      "CandidateEntry": {
        "description": "A candidate pubkey offered when a neighbor edge is ambiguous.",
        "properties": {
          "name": {
            "description": "Candidate node display name.",
            "type": "string"
          },
          "pubkey": {
            "description": "Candidate node public key (hex).",
            "type": "string"
          },
          "role": {
            "description": "Candidate node role (e.g. repeater, room).",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ChannelMessage": {
        "additionalProperties": true,
        "description": "A single channel message, aggregated across every observation of the same transmission.",
        "properties": {
          "channelHashHex": {
            "description": "The two-digit uppercase hexadecimal representation of the actual one-byte channel hash carried by the packet, taken from the decoded payload. Always exactly two uppercase hex characters when present, including a leading zero (\"00\", \"03\", \"A7\", \"FF\") — \"00\" is a valid, meaningful present value, never an absence. Optional, and its absence does not mean every new message eventually gets it: the field stays absent whenever the wire byte was never available or could not be trusted, which includes (1) legacy records stored before this field existed, (2) malformed stored values, rejected rather than guessed, and (3) every message ingested through the Companion/MQTT bridge — permanently and by design, not merely legacy backlog, because that path delivers already-decrypted text and never observes the raw packet envelope. Absence always means \"unavailable\", never \"zero\". Non-secret — it is the first byte of the GRP_TXT/GRP_DATA payload envelope, sent unencrypted ahead of the encrypted body (it is not a field of every packet header), and no channel key or PSK is read or exposed to produce it. Never derived or reconstructed from the operator-assigned channel name, the {hash} route/path label, transmissions.channel_hash, or a channel key/PSK — only ever copied from the value the ingestor decoder read off the wire. COLLISION-PRONE: one byte is not a unique channel identity — distinct channels collide, so this field is an evidence component to be combined with other signals, never sufficient on its own to identify a channel. This validated contract covers GET /api/channels/{hash}/messages only. CoreScope's live WebSocket broadcast is a separate, unvalidated surface: it passes each packet's raw decoded_json through verbatim as decoded.payload, so a channelHashHex value observed there has not gone through this validator and must not be treated as equivalent REST evidence.",
            "pattern": "^[0-9A-F]{2}$",
            "type": "string"
          },
          "hops": {
            "description": "Relay path length for the reported observation.",
            "type": "integer"
          },
          "observers": {
            "description": "Distinct observers that heard this transmission.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "packetHash": {
            "description": "Transmission hash used for dedup.",
            "nullable": true,
            "type": "string"
          },
          "packetId": {
            "description": "CoreScope row id associated with this message, but its identity semantics are backend-dependent: which row it identifies (observation vs. transmission) varies by storage backend, a divergence that pre-dates and is unrelated to this schema addition. Must not be used as a cross-backend correlation key. Consumers that need to correlate the same packet across backends should use packetHash instead, which is stable regardless of backend.",
            "type": "integer"
          },
          "repeats": {
            "description": "Number of observations aggregated into this message.",
            "type": "integer"
          },
          "scope": {
            "nullable": true,
            "type": "string"
          },
          "sender": {
            "description": "Display sender, split from the message text at its first \": \" separator. A heuristic label, never an identity: channel frames carry no sender field, so this is a substring of the message body and can be the body's first clause rather than a real name.",
            "type": "string"
          },
          "sender_timestamp": {
            "description": "The sender's own embedded wire timestamp, read verbatim from the decrypted payload. The key is always present; its value is null when unavailable (the decoded packet carries no sender timestamp). Unchanged by this schema.",
            "nullable": true,
            "type": "integer"
          },
          "snr": {
            "nullable": true,
            "type": "number"
          },
          "text": {
            "description": "Message body with the sender prefix removed.",
            "type": "string"
          },
          "timestamp": {
            "description": "Existing observation/ingest-based display timestamp: the latest observation time recorded for this transmission (server-side), falling back to first-seen when no observation timestamp exists. It reflects when the message was observed, not when the sender stamped it, and it moves forward as further observations of the same transmission arrive. Unchanged by this schema.",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ChannelMessagesResponse": {
        "properties": {
          "messages": {
            "items": {
              "$ref": "#/components/schemas/ChannelMessage"
            },
            "type": "array"
          },
          "total": {
            "description": "Total messages in the channel after region filtering, before pagination.",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "EstimatedAreaNode": {
        "description": "One node with no real GPS fix, plotted at its nearestPositionedNeighbor weighted-centroid estimate -- the same technique View Path's approximate markers use.",
        "properties": {
          "areaKey": {
            "description": "The area this estimated position falls inside.",
            "type": "string"
          },
          "contributorCount": {
            "description": "How many positioned neighbors fed into the estimate.",
            "type": "integer"
          },
          "label": {
            "description": "That area's display label.",
            "type": "string"
          },
          "lat": {
            "description": "Estimated latitude (weighted centroid of positioned neighbors).",
            "type": "number"
          },
          "lon": {
            "description": "Estimated longitude.",
            "type": "number"
          },
          "name": {
            "description": "Display name, falling back to the raw pubkey when unresolved.",
            "type": "string"
          },
          "publicKey": {
            "description": "The node's pubkey.",
            "type": "string"
          },
          "spreadKm": {
            "description": "How spread out (km) those contributing neighbors were -- a rough confidence signal, wider spread means a less certain estimate.",
            "type": "number"
          }
        },
        "type": "object"
      },
      "GPSSanityResponse": {
        "description": "Nodes whose self-reported GPS disagrees with a trusted cluster of their own RF neighbors. When estimatedPositions.enabled is false, returns only estimatedPositionsEnabled:false; nodes, totalRealGps and evaluated are omitted, not reported as zero.",
        "properties": {
          "estimatedPositionsEnabled": {
            "type": "boolean",
            "description": "Present as false only when neighbor-derived position estimation is disabled by the operator."
          },
          "evaluated": {
            "description": "The subset of totalRealGps that had a trustworthy neighbor cluster to compare against.",
            "type": "integer"
          },
          "nodes": {
            "description": "Flagged nodes, sorted worst (largest distanceKm) first.",
            "items": {
              "$ref": "#/components/schemas/SuspiciousGPSNode"
            },
            "type": "array"
          },
          "totalRealGps": {
            "description": "Every node with a real (non-zero) GPS fix -- the population this check ran over.",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "HeardDirectObserver": {
        "type": "object",
        "description": "Heard By (#76), direct: at least one observation shows this observer received the node's own transmission on air. Observed routing evidence, not radio range. Only an ADVERT (signature not known invalid) can show it, with the observation's own route type (its frame header; else the transmission's route type, unknown when the transmission was heard on both flood and direct routes) and its own path: a FLOOD or TRANSPORT_FLOOD path that is empty credits the advertiser, a non-empty one its last hop when that hop is the node's full key or a wire prefix unique among relay-capable nodes and the node is not a listener; an empty DIRECT or TRANSPORT_DIRECT path (zero hop) credits the advertiser; a non-empty direct path is the remaining route and credits nobody. An observer never counts as hearing its own upload. Hidden identities are left out.",
        "properties": {
          "avgRssi": {
            "type": "number",
            "description": "Mean RSSI (dBm) over the direct receptions.",
            "nullable": true
          },
          "avgSnr": {
            "type": "number",
            "description": "Mean SNR (dB) over the direct receptions: the node's signal at this observer.",
            "nullable": true
          },
          "can_relay": {
            "type": "boolean",
            "description": "Node health only: false for an observer that reported repeat off (listener), true for repeat on; omitted when it never reported repeat."
          },
          "observer_id": {
            "type": "string"
          },
          "observer_name": {
            "type": "string"
          },
          "packetCount": {
            "type": "integer",
            "description": "Direct receptions.",
            "minimum": 0
          }
        }
      },
      "HeardRelayObserver": {
        "type": "object",
        "description": "Heard By (#76), relay: this observer saw the node's traffic, but no observation shows it received the node's own transmission (relayed copies, non-ADVERT traffic, direct routes, an ambiguous last hop). Its signal values describe another transmitter and are not reported. An empty directObservers list is missing evidence, not proof of missing coverage.",
        "properties": {
          "can_relay": {
            "type": "boolean",
            "description": "Node health only: false for an observer that reported repeat off (listener), true for repeat on; omitted when it never reported repeat."
          },
          "observer_id": {
            "type": "string"
          },
          "observer_name": {
            "type": "string"
          },
          "packetCount": {
            "type": "integer",
            "description": "The node's transmissions this observer saw (any copy).",
            "minimum": 0
          }
        }
      },
      "HopAnalyticsPacket": {
        "description": "One transmission that passed through the queried node as a relay hop (issue #1812).",
        "properties": {
          "hash": {
            "description": "Packet hash.",
            "type": "string"
          },
          "hops": {
            "description": "0-based index of the queried node within the packet's resolved relay path — the value MeshCore firmware compares against flood_max in allowPacketForward. NOT distance to the reporting observer.",
            "type": "integer"
          },
          "scoped": {
            "description": "Whether the transmission carried a region scope (TRANSPORT_FLOOD/TRANSPORT_DIRECT).",
            "type": "boolean"
          },
          "transport": {
            "description": "Which firmware flood.max* knob (if any) caps this packet's hop count.",
            "enum": [
              "flood",
              "flood_advert",
              "flood_unscoped",
              "direct",
              "unknown"
            ],
            "type": "string"
          },
          "tsMs": {
            "description": "First-seen timestamp, Unix milliseconds.",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "HopDepthAnalyticsResponse": {
        "properties": {
          "scopedHopDepth": {
            "description": "Hop-depth histogram for scoped (TRANSPORT_FLOOD/TRANSPORT_DIRECT) traffic.",
            "items": {
              "$ref": "#/components/schemas/HopDepthBucket"
            },
            "type": "array"
          },
          "timeSeries": {
            "description": "Scoped/unscoped median hop depth over time within the window — is containment trending better or worse.",
            "items": {
              "$ref": "#/components/schemas/HopDepthTimePoint"
            },
            "type": "array"
          },
          "unscopedByRepeater": {
            "description": "Per-repeater/room breakdown of unscoped hop depth, sorted by count descending.",
            "items": {
              "$ref": "#/components/schemas/RepeaterUnscopedHopDepth"
            },
            "type": "array"
          },
          "unscopedHopDepth": {
            "description": "Hop-depth histogram for unscoped (plain FLOOD) traffic.",
            "items": {
              "$ref": "#/components/schemas/HopDepthBucket"
            },
            "type": "array"
          },
          "window": {
            "description": "Time window this response covers: 1h, 24h, or 7d.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "HopDepthBucket": {
        "description": "How many relay-hop instances (network-wide) saw a given hop count.",
        "properties": {
          "count": {
            "type": "integer"
          },
          "hops": {
            "description": "0-based hop index.",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "HopDepthTimePoint": {
        "description": "One time bucket's scoped/unscoped median hop depth (5min/1h/6h buckets for 1h/24h/7d windows, same bucketing as ScopeStatsResponse.timeSeries).",
        "properties": {
          "scopedMedianHop": {
            "description": "Median hop depth of scoped traffic in this bucket, or null if there was none (0 is a valid median, so absence isn't the same as zero).",
            "nullable": true,
            "type": "integer"
          },
          "t": {
            "description": "Bucket start, RFC3339 UTC.",
            "type": "string"
          },
          "unscopedMedianHop": {
            "description": "Median hop depth of unscoped traffic in this bucket, or null if there was none.",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Moment": {
        "type": "object",
        "properties": {
          "at": {
            "type": "string",
            "description": "RFC3339 time the moment was detected."
          },
          "id": {
            "type": "string",
            "description": "Unique per server run; clients deduplicate by it."
          },
          "kind": {
            "type": "string",
            "enum": [
              "new_node",
              "back_online",
              "record_link",
              "busiest_repeater"
            ]
          },
          "link": {
            "$ref": "#/components/schemas/MomentLink"
          },
          "more": {
            "type": "integer",
            "description": "Further nodes of the same kind folded into this moment by the per-kind cap; omitted when 0.",
            "minimum": 0
          },
          "node": {
            "$ref": "#/components/schemas/MomentNode"
          },
          "previousKm": {
            "type": "number",
            "description": "record_link: the record this link beat; omitted for the first record."
          },
          "relays": {
            "type": "integer",
            "description": "busiest_repeater: distinct non-advert packets relayed in windowMinutes.",
            "minimum": 0
          },
          "silentHours": {
            "type": "number",
            "description": "back_online: hours of silence, 0.1 h."
          },
          "windowMinutes": {
            "type": "integer",
            "description": "busiest_repeater: the busy window.",
            "minimum": 0
          }
        }
      },
      "MomentLink": {
        "type": "object",
        "properties": {
          "a": {
            "$ref": "#/components/schemas/MomentNode"
          },
          "b": {
            "$ref": "#/components/schemas/MomentNode"
          },
          "distanceKm": {
            "type": "number",
            "description": "Great-circle distance between the advertised positions, 0.1 km."
          }
        }
      },
      "MomentNode": {
        "type": "object",
        "description": "A node in a moment. Never a companion.",
        "properties": {
          "lat": {
            "type": "number",
            "description": "Advertised latitude; omitted without GPS (never 0,0 or an estimate)."
          },
          "lon": {
            "type": "number",
            "description": "Advertised longitude; omitted without GPS."
          },
          "name": {
            "type": "string",
            "description": "Omitted when the node has no name."
          },
          "publicKey": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        }
      },
      "MomentsResponse": {
        "type": "object",
        "properties": {
          "moments": {
            "type": "array",
            "description": "Newest first.",
            "items": {
              "$ref": "#/components/schemas/Moment"
            }
          }
        }
      },
      "NeighborEntry": {
        "description": "One neighbor of the queried node, with affinity score and observation metadata.",
        "properties": {
          "ambiguous": {
            "type": "boolean"
          },
          "avg_snr": {
            "nullable": true,
            "type": "number"
          },
          "candidates": {
            "items": {
              "$ref": "#/components/schemas/CandidateEntry"
            },
            "type": "array"
          },
          "count": {
            "description": "Total observations supporting this neighborship.",
            "type": "integer"
          },
          "counts_by_mode": {
            "additionalProperties": {
              "type": "integer"
            },
            "description": "#1638: observation counts keyed by hash-prefix mode in bytes (1/2/3; 0 = legacy/unknown).",
            "type": "object"
          },
          "distance_km": {
            "nullable": true,
            "type": "number"
          },
          "first_seen": {
            "type": "string"
          },
          "last_seen": {
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "observers": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "prefix": {
            "description": "Raw hop hash prefix that established this edge.",
            "type": "string"
          },
          "pubkey": {
            "description": "Resolved neighbor public key, or null when only a hop prefix is known.",
            "nullable": true,
            "type": "string"
          },
          "role": {
            "nullable": true,
            "type": "string"
          },
          "score": {
            "description": "Affinity score: count saturation × recency decay × observer-diversity confidence.",
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          },
          "unresolved": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "NetworkDigest": {
        "description": "Rolling-window summary of New Nodes + Node Changes activity (Tools \u003e Network Digest).",
        "properties": {
          "areaBreakdown": {
            "description": "Every configured area with at least one new node in the window, most active first (ties alphabetical). Omitted when no new node in the window has a known area.",
            "items": {
              "$ref": "#/components/schemas/AreaGrowth"
            },
            "type": "array"
          },
          "changesCapped": {
            "description": "Same as newNodesCapped, for roleChanges/nameChanges/positionMoves/resurrections. Omitted (false) otherwise.",
            "type": "boolean"
          },
          "nameChanges": {
            "type": "integer"
          },
          "newNodes": {
            "description": "Nodes first seen within the window (same exclusions as /api/analytics/new-nodes).",
            "type": "integer"
          },
          "newNodesCapped": {
            "description": "True when the underlying fetch hit its row cap (500) and the oldest fetched row is still inside the window -- newNodes is then a floor, not an exact total. Omitted (false) otherwise.",
            "type": "boolean"
          },
          "origin": {
            "description": "The requested origin filter: \"all\", \"domestic\", or \"foreign\".",
            "type": "string"
          },
          "positionMoves": {
            "type": "integer"
          },
          "resurrections": {
            "type": "integer"
          },
          "roleChanges": {
            "type": "integer"
          },
          "since": {
            "description": "RFC3339 timestamp the window starts at.",
            "type": "string"
          },
          "window": {
            "description": "The requested window, e.g. \"7d\".",
            "type": "string"
          }
        },
        "type": "object"
      },
      "NewNodeEntry": {
        "properties": {
          "areas": {
            "description": "Every configured area this node's position falls in, alphabetized. Omitted when the node has no known position or no areas are configured.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "firstSeen": {
            "description": "RFC3339 timestamp this node was first ever seen.",
            "type": "string"
          },
          "foreign": {
            "description": "True when this node's ADVERT GPS lay outside the configured geofilter polygon (#730, same flag the node list's \"foreign\" field uses).",
            "type": "boolean"
          },
          "lat": {
            "description": "Last known latitude, when known.",
            "nullable": true,
            "type": "number"
          },
          "lon": {
            "description": "Last known longitude, when known.",
            "nullable": true,
            "type": "number"
          },
          "name": {
            "description": "Display name, when known.",
            "type": "string"
          },
          "publicKey": {
            "description": "The node's full public key.",
            "type": "string"
          },
          "role": {
            "description": "Node role (repeater/room/companion/sensor/etc), when known.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "NewNodesResponse": {
        "description": "Most recently first-seen nodes, network-wide (Tools \u003e New Nodes). Empty (not an error) when nothing qualifies.",
        "properties": {
          "newNodes": {
            "items": {
              "$ref": "#/components/schemas/NewNodeEntry"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "Node": {
        "additionalProperties": true,
        "description": "A mesh node. Repeater and room nodes additionally carry the issue #672 usefulness metrics and relay-activity fields below; those fields are absent on other roles. NOTE: coverage_score, redundancy_score and usefulness_grade ship only with the #672 4-axis scorer (PR #1762) and are absent on every build without it; until that lands usefulness_score is aliased to traffic_share_score. Only traffic_share_score and bridge_score ship today.",
        "properties": {
          "advert_count": {
            "type": "integer"
          },
          "battery_mv": {
            "nullable": true,
            "type": "integer"
          },
          "bridge_score": {
            "description": "#672 Bridge axis: normalized betweenness centrality (chokepoint importance). Repeater/room only.",
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          },
          "configured_scope": {
            "description": "Last CONFIRMED region-scope membership list from an observer /neighbors report (#1865) -- concrete evidence, distinct from the inferred default_scope. null or absent: no confirmed configured-scope evidence exists for this node (older server without this column, or genuinely never observed -- these are indistinguishable to the client). \"\" (empty string) together with a non-null configured_scope_at: the observer successfully queried this node and it confirmed zero configured scopes -- a real, positive result, not a missing one. \"*\": the MeshCore protocol wildcard (responds to any scope) -- never rewritten to \"#*\". Any other value: a normalized, comma-separated, \"#\"-prefixed region list, e.g. \"#dk,#eu\". A /neighbors query timeout, or a neighbor absent from a later report, never clears a previously confirmed value -- only a newer report with a valid, accepted timestamp changes it.",
            "nullable": true,
            "type": "string"
          },
          "configured_scope_at": {
            "description": "RFC3339 UTC timestamp of the most recent /neighbors report accepted as configured_scope evidence. null/absent whenever configured_scope is null/absent. This is the time of the last ACCEPTED report, not a guarantee the node's live configuration still matches it -- the node may have been reconfigured since. For writes accepted going forward, a report with a missing or unparseable timestamp is rejected outright (neither field changes) rather than substituted with server receive-time -- but that is a contract for new writes, not a retroactive guarantee: a database written before this validation existed may still contain rows where this field is an empty string rather than null.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "coverage_score": {
            "description": "#672 Coverage axis: normalized harmonic reach centrality (how much of the mesh the node can reach). Repeater/room only.",
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          },
          "default_scope": {
            "description": "The region this node floods to by default. null: no default_scope is currently known for this node (neither packet-inferred nor firmware-confirmed). \"\" is not produced by any current write path -- present only in databases written before the empty-scope guards existed (#1534). \"*\": the firmware's explicit \"no default region set\" sentinel. Any other value: a normalized \"#\"-prefixed region name, e.g. \"#dk\". The value may be packet-inferred (from an observed transport-scoped advert) or firmware-confirmed (see default_scope_confirmed_at) -- confirmed evidence, once set, can never be silently downgraded by a later inferred write, including when the confirmation exists on the node's row in the OTHER retention table (active vs. recently-pruned) rather than the one this response reflects.",
            "nullable": true,
            "type": "string"
          },
          "default_scope_confirmed_at": {
            "description": "RFC3339 UTC timestamp of the most recent observer /neighbors report that self-reported this node's default_scope (self.default_scope, added to the firmware 2026-07-29). Non-empty: default_scope is firmware-confirmed provenance for the row this response reflects, not a packet-inferred guess. null: no current confirmed provenance on this specific row -- default_scope, if present, is packet-inferred only; this does not by itself mean no confirmation exists anywhere for the node, since inferred writes are cross-table-protected against a confirmation held on the node's other retention-table row even when it is not the one exposed here. A database written before this validation existed may contain historical rows where this field is an empty string rather than null.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "est_airtime_pct_24h": {
            "description": "Repeater/room only (#697): estimated relay duty cycle over the last 24 hours, in percent. LoRa time-on-air of every packet the node relayed (adverts of other nodes included) at the configured loraPreset, divided by 24 h. A lower bound: only flood packets an observer heard with the node in the raw path count; its own adverts and direct-routed traffic do not. Checked against repeaters that report their own TX airtime it was 2-74% of the real figure, so a low value does not mean the node is under the duty-cycle limit.",
            "type": "number"
          },
          "est_airtime_peak_pct": {
            "description": "Repeater/room only (#697): the same estimate for the node's busiest rolling hour in the last 24 hours, in percent of that hour. The 10% duty-cycle limit applies per hour; as a lower bound, a value at the limit means the node is over it.",
            "type": "number"
          },
          "estimated_contributor_count": {
            "description": "Number of positioned neighbors the estimated_lat/estimated_lon centroid was averaged from. Present only alongside estimated_lat/estimated_lon.",
            "type": "integer"
          },
          "estimated_distance_km": {
            "description": "Distance between the node's own reported lat/lon and estimated_lat/estimated_lon. Present only when the node has BOTH a real fix and an estimate -- absent when either is missing.",
            "type": "number"
          },
          "estimated_lat": {
            "description": "Node detail endpoint only: an approximate position from the same neighbor-centroid estimate (geo-sanity-filtered via Config.NeighborMaxEdgeKm) that backs Position-Fix Coverage Gaps, View Path's approx markers, and Suspicious GPS Positions. Present whenever the node has a trustworthy neighbor cluster to estimate from, regardless of whether it also has a real (lat/lon) fix -- lets the detail page show both side by side to visually cross-check a node flagged by Suspicious GPS Positions.",
            "nullable": true,
            "type": "number"
          },
          "estimated_lon": {
            "description": "Paired with estimated_lat.",
            "nullable": true,
            "type": "number"
          },
          "first_seen": {
            "description": "RFC3339 timestamp of the first observation.",
            "type": "string"
          },
          "flood_advert_count_7d": {
            "description": "Distinct FLOOD adverts originated in the last 7 days (zero-hop adverts excluded). Present on the node detail endpoint.",
            "type": "integer"
          },
          "last_relayed": {
            "description": "Repeater/room only: RFC3339 time this node last appeared as a relay hop.",
            "type": "string"
          },
          "last_seen": {
            "description": "RFC3339 timestamp of the most recent observation.",
            "type": "string"
          },
          "lat": {
            "nullable": true,
            "type": "number"
          },
          "lon": {
            "nullable": true,
            "type": "number"
          },
          "name": {
            "description": "Node display name (most recent advert name).",
            "type": "string"
          },
          "public_key": {
            "description": "Node public key (hex).",
            "type": "string"
          },
          "redundancy_score": {
            "description": "#672 Redundancy axis: normalized articulation-point criticality — 1 means removing the node fragments the mesh, 0 means alternate paths exist. Repeater/room only.",
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          },
          "relay_active": {
            "description": "Repeater/room only: relayed traffic within the active window.",
            "type": "boolean"
          },
          "relay_count_1h": {
            "description": "Repeater/room only: relay-hop appearances in the last hour.",
            "type": "integer"
          },
          "relay_count_24h": {
            "description": "Repeater/room only: relay-hop appearances in the last 24 hours.",
            "type": "integer"
          },
          "relay_window_hours": {
            "description": "Repeater/room only, /api/nodes/{pubkey} detail endpoint only: width (hours) of the relay-activity window the relay_count_* values cover.",
            "type": "integer"
          },
          "role": {
            "description": "Node role (e.g. repeater, room, client, sensor).",
            "type": "string"
          },
          "temperature_c": {
            "nullable": true,
            "type": "number"
          },
          "traffic_share_score": {
            "description": "#672 Traffic axis: share of non-advert traffic relayed through this repeater. Repeater/room only.",
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          },
          "transported_scopes": {
            "description": "Repeater/room only: sorted, deduplicated region scopes this node has ever carried as a relay hop, while still resident in the in-memory index (NOT time-windowed -- can include scopes last carried weeks ago). Absent when empty.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "transported_scopes_recent": {
            "description": "Repeater/room only: subset of transported_scopes last carried within the relay-activity window (same window as relay_active) -- a live signal, not just ever-seen. Absent when empty.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "unscoped_relay_count_24h": {
            "description": "Repeater/room only: subset of relay_count_24h that were unscoped floods (route_type FLOOD). A well-configured repeater sets flood.max.unscoped 0, so a non-trivial count flags a base-config problem.",
            "type": "integer"
          },
          "usefulness_grade": {
            "description": "Letter grade derived from usefulness_score. Repeater/room only.",
            "enum": [
              "A",
              "B",
              "C",
              "D",
              "F"
            ],
            "type": "string"
          },
          "usefulness_score": {
            "description": "#672 composite usefulness = 0.30·bridge + 0.25·coverage + 0.25·redundancy + 0.20·traffic. Until the 4-axis scorer ships (PR #1762) this is aliased to traffic_share_score. Repeater/room only.",
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          }
        },
        "type": "object"
      },
      "NodeAdvert": {
        "additionalProperties": true,
        "description": "A recent transmission/advert from a node (the /api/packets transmission shape). Only the commonly-used fields are documented.",
        "properties": {
          "first_seen": {
            "description": "RFC3339 time the transmission was first observed.",
            "type": "string"
          },
          "from_pubkey": {
            "description": "Originating node public key.",
            "type": "string"
          },
          "hash": {
            "description": "Transmission content hash.",
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "payload_type": {
            "description": "MeshCore payload type.",
            "type": "integer"
          },
          "route_class": {
            "type": "string",
            "description": "Node detail with include=advertRoutes, ADVERT rows only (absent on other payload types and without the opt-in): the advert's route class, classified like Relay Airtime Share's ADVERT rows. flood: only route 0/1 (transport flood/flood) seen for the content hash; zero_hop: only route 2/3 (a zero-hop advert is sent DIRECT with an empty path); mixed: both; unknown: no usable route - the same bucket Relay Airtime Share's route_class calls \"legacy\" (its historical plain ADVERT row); node detail names it for what it is, both come from one classifier. Omitted when the node's identity is hidden. From transmissions.route_mask, falling back to the first-inserted route_type while the mask is not backfilled (see advertCounts.route_mask_backfill).",
            "enum": [
              "flood",
              "zero_hop",
              "mixed",
              "unknown"
            ]
          }
        },
        "type": "object"
      },
      "NodeAdvertCounts": {
        "type": "object",
        "description": "Node detail with include=advertRoutes only (#2073): distinct ADVERTs (by content hash) per route class whose first_seen - when the advert was first heard, the axis flood_advert_count_7d also uses - lies in the last 24 hours / 7 days. Classified like NodeAdvert.route_class. Unlike Node.flood_advert_count_7d (route_type 1 only, unchanged external contract), 7d.flood also counts transport flood (route 0) and never counts a mixed advert. Rows whose first_seen cannot be parsed are skipped, as for flood_advert_count_7d. unknown is the bucket Relay Airtime Share calls legacy (same classifier, see NodeAdvert.route_class). Absent without include=advertRoutes and when the node's identity is hidden.",
        "properties": {
          "24h": {
            "$ref": "#/components/schemas/AdvertRouteCounts"
          },
          "7d": {
            "$ref": "#/components/schemas/AdvertRouteCounts"
          },
          "route_mask_backfill": {
            "$ref": "#/components/schemas/RouteMaskBackfillStatus"
          },
          "truncated": {
            "type": "boolean",
            "description": "true when the node had more adverts at or after the 7d date floor than the per-request row cap (50000); the counts then cover the newest rows only."
          }
        }
      },
      "NodeAdvertIntervals": {
        "type": "object",
        "description": "Node detail with include=advertRoutes only (#245): the node's estimated flood and zero-hop advert intervals, from the gaps between the adverts listed in recentAdvertsByRoute.flood / .zero_hop (mixed and unknown adverts are not used). A gap uses the adverts' own (sender) timestamps when both are plausible - not ahead of first_seen by more than 10 min, positive, and within max(10 min, 10 %) of the first_seen gap - else first_seen. The interval must be seen directly in at least two gaps and a quarter of them, and be one the class's timer can run at (flood 3 h or more, zero-hop 2 min or 60 min or more, each less 10 %); gaps of 2-4x it count as missed adverts, shorter gaps (manual adverts, reboots) are dropped, longer gaps that are no multiple are irregular. When the newest 3 gaps that fit are all the same multiple k \u003e 1 the interval was raised, and the estimate is redone on the adverts since the change. It is the median of gap/k over the gaps that fit k x the interval, snapped to the firmware's settable values: flood.advert.interval whole hours 3-168, advert.interval even minutes 60-240 or the 2-minute new-install default. No zero-hop adverts can mean the node's zero-hop interval is 0 (off) or that no observer hears it directly. Absent without include=advertRoutes and when the node's identity is hidden; cached with recentAdvertsByRoute.",
        "properties": {
          "flood": {
            "$ref": "#/components/schemas/AdvertIntervalEstimate"
          },
          "window": {
            "type": "integer",
            "description": "Most adverts per class considered (the recentAdvertsByRoute limit, 20)."
          },
          "zero_hop": {
            "$ref": "#/components/schemas/AdvertIntervalEstimate"
          }
        }
      },
      "NodeAdvertsByRoute": {
        "type": "object",
        "description": "Node detail with include=advertRoutes only (#2073): the newest ADVERTs of the node per route class (see NodeAdvert.route_class), newest ingest first. The class is filtered before the per-class limit, so frequent zero-hop adverts cannot push rare flood adverts out; a mixed advert is listed only under mixed. Rows are the NodeAdvert shape without the observations array (observation_count and the best observation's observer/snr/rssi/path fields are kept); route_class is the class the row was listed under. Absent without include=advertRoutes and when the node's identity is hidden (node or observer blacklist, hidden-name prefix). Cached per node for up to 30 s (refreshed once the node has a newer transmission, at most every 5 s).",
        "properties": {
          "flood": {
            "type": "array",
            "description": "Adverts seen only on flood routes (0/1).",
            "items": {
              "$ref": "#/components/schemas/NodeAdvert"
            }
          },
          "limit": {
            "type": "integer",
            "description": "Maximum rows per class (20)."
          },
          "mixed": {
            "type": "array",
            "description": "Adverts seen on both flood and zero-hop routes.",
            "items": {
              "$ref": "#/components/schemas/NodeAdvert"
            }
          },
          "unknown": {
            "type": "array",
            "description": "Adverts with no usable route (Relay Airtime Share's legacy bucket); present only when the node has any.",
            "items": {
              "$ref": "#/components/schemas/NodeAdvert"
            }
          },
          "zero_hop": {
            "type": "array",
            "description": "Adverts seen only on zero-hop routes (2/3).",
            "items": {
              "$ref": "#/components/schemas/NodeAdvert"
            }
          }
        }
      },
      "NodeChangeEntry": {
        "properties": {
          "changeType": {
            "description": "One of \"role\", \"name\", \"position\", or \"resurrected\".",
            "type": "string"
          },
          "detectedAt": {
            "description": "RFC3339 timestamp this change was detected.",
            "type": "string"
          },
          "distanceKm": {
            "description": "Distance between old and new position. Only present when changeType is \"position\".",
            "nullable": true,
            "type": "number"
          },
          "foreign": {
            "description": "Mirrors nodes.foreign_advert for the node's CURRENT state -- same All/Domestic/Foreign vocabulary as /api/analytics/new-nodes.",
            "type": "boolean"
          },
          "id": {
            "description": "node_changes row id.",
            "type": "integer"
          },
          "name": {
            "description": "The node's CURRENT display name (resolved fresh), not a historical snapshot at the time of the change.",
            "type": "string"
          },
          "newValue": {
            "description": "For role/name: the new raw value. For position: \"lat,lon\". Empty for resurrected.",
            "type": "string"
          },
          "oldValue": {
            "description": "For role/name: the previous raw value. For position: \"lat,lon\". For resurrected: the last_seen timestamp from inactive_nodes before the node returned.",
            "type": "string"
          },
          "publicKey": {
            "description": "The node's full public key.",
            "type": "string"
          },
          "role": {
            "description": "The node's CURRENT role (resolved fresh, same convention as name).",
            "type": "string"
          }
        },
        "type": "object"
      },
      "NodeChangesResponse": {
        "description": "Recent node role/name/position changes and pruned-node returns (Tools \u003e Node Changes). Empty (not an error) when nothing has been logged yet.",
        "properties": {
          "nodeChanges": {
            "items": {
              "$ref": "#/components/schemas/NodeChangeEntry"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "NodeDetailResponse": {
        "properties": {
          "advertCounts": {
            "$ref": "#/components/schemas/NodeAdvertCounts"
          },
          "advertIntervals": {
            "$ref": "#/components/schemas/NodeAdvertIntervals"
          },
          "node": {
            "$ref": "#/components/schemas/Node"
          },
          "recentAdverts": {
            "description": "Up to 20 most recent transmissions from this node (newest ingest first, #1345), all route classes together.",
            "items": {
              "$ref": "#/components/schemas/NodeAdvert"
            },
            "type": "array"
          },
          "recentAdvertsByRoute": {
            "$ref": "#/components/schemas/NodeAdvertsByRoute"
          }
        },
        "type": "object"
      },
      "NodeHealthResponse": {
        "type": "object",
        "properties": {
          "activity24h": {
            "type": "object",
            "description": "The rolling 24-hour window of the node's transmissions: 24 one-hour buckets, windowStart/windowEnd, coverageStart and complete, plus previous {windowStart, windowEnd, count, complete} — the equally long window before it, for a like-for-like comparison only (#304). A window is complete only when the in-memory history is proven to cover all of it; an incomplete window is a lower bound, never a quiet period."
          },
          "directObservers": {
            "type": "array",
            "description": "Observers that received the node's own transmission, most direct receptions first.",
            "items": {
              "$ref": "#/components/schemas/HeardDirectObserver"
            }
          },
          "node": {
            "type": "object",
            "description": "The node row."
          },
          "recentPackets": {
            "type": "array",
            "description": "Newest 20 transmissions, observations stripped.",
            "items": {
              "type": "object"
            }
          },
          "relayObservers": {
            "type": "array",
            "description": "Every other observer of the node's transmissions, most transmissions first.",
            "items": {
              "$ref": "#/components/schemas/HeardRelayObserver"
            }
          },
          "stats": {
            "type": "object",
            "properties": {
              "avgHops": {
                "type": "integer",
                "description": "Node health only: rounded mean path length of the node's transmissions."
              },
              "avgSnr": {
                "type": "number",
                "description": "Mean SNR (dB) over the node's direct receptions (HeardDirectObserver); null without one. Other copies carry the SNR of whichever node the observer heard.",
                "nullable": true
              },
              "lastAdvert": {
                "type": "string",
                "description": "Newest own ADVERT: from the packet-store window, else the newest own ADVERT in the database (#848).",
                "nullable": true
              },
              "lastAdvertSource": {
                "type": "string",
                "description": "Where lastAdvert came from: window (in-memory packet store) or db (database, outside the window). Omitted when lastAdvert is null (#848)."
              },
              "lastHeard": {
                "type": "string",
                "description": "Newest own ADVERT or unambiguous relay evidence (#64).",
                "nullable": true
              },
              "packetsToday": {
                "type": "integer",
                "minimum": 0
              },
              "totalObservations": {
                "type": "integer",
                "minimum": 0
              },
              "totalPackets": {
                "type": "integer",
                "description": "Same as totalTransmissions (backward compatibility).",
                "minimum": 0
              },
              "totalTransmissions": {
                "type": "integer",
                "minimum": 0
              }
            }
          }
        }
      },
      "NodeHopAnalyticsResponse": {
        "properties": {
          "packets": {
            "items": {
              "$ref": "#/components/schemas/HopAnalyticsPacket"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "NodeListResponse": {
        "properties": {
          "counts": {
            "additionalProperties": {
              "type": "integer"
            },
            "description": "Per-role node counts.",
            "type": "object"
          },
          "nodes": {
            "items": {
              "$ref": "#/components/schemas/Node"
            },
            "type": "array"
          },
          "total": {
            "description": "Total nodes matching the query after filtering.",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "NodeNeighborsResponse": {
        "properties": {
          "neighbors": {
            "items": {
              "$ref": "#/components/schemas/NeighborEntry"
            },
            "type": "array"
          },
          "node": {
            "description": "The queried node's public key.",
            "type": "string"
          },
          "total_observations": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "PacketPathBranch": {
        "description": "One station's own route to a packet: how far it traveled to reach them (from that observation's raw hop count, independent of how much of it resolved) and, where resolvable, each hop's position in path order.",
        "properties": {
          "distanceFromFirstKm": {
            "description": "Great-circle distance (km) between this branch's own observer and first's observer. Zero for first itself. Omitted when either position is unknown, or when either observer is positioned via approx (an estimate compounding another estimate isn't worth surfacing).",
            "type": "number"
          },
          "hops": {
            "description": "Hop count for this station's deepest observation, taken from the raw path length -- present even when none of it resolved.",
            "type": "integer"
          },
          "observer": {
            "$ref": "#/components/schemas/PacketPathObserver"
          },
          "points": {
            "description": "The resolvable portion of the relay path in hop order. Can be shorter than hops, or empty, when some/all hops never resolved.",
            "items": {
              "$ref": "#/components/schemas/PacketPathPoint"
            },
            "type": "array"
          },
          "secondsAfterFirst": {
            "description": "Seconds after the earliest-arriving observation (see PacketPathResponse.first) this branch's own observation arrived. Zero for first itself. Omitted when either timestamp is unknown.",
            "type": "number"
          },
          "snr": {
            "description": "SNR of this station's deepest observation.",
            "nullable": true,
            "type": "number"
          }
        },
        "type": "object"
      },
      "PacketPathObserver": {
        "description": "The station that produced a given branch's observation of a packet path, positioned from its own self-advertised GPS when known (same source as /api/observers), else its configured IATA code, else a weighted centroid of its positioned neighbors (see approx).",
        "properties": {
          "approx": {
            "description": "True when lat/lon are not this station's own position but a count-weighted centroid of its positioned neighbors instead -- a last-resort stand-in, not a real fix.",
            "type": "boolean"
          },
          "approxNeighborCount": {
            "description": "Present only when approx=true. See PacketPathPoint.approxNeighborCount.",
            "type": "integer"
          },
          "approxSpreadKm": {
            "description": "Present only when approx=true and approxNeighborCount\u003e1. See PacketPathPoint.approxSpreadKm.",
            "nullable": true,
            "type": "number"
          },
          "iata": {
            "description": "Observer's configured IATA airport code, when set.",
            "type": "string"
          },
          "lat": {
            "nullable": true,
            "type": "number"
          },
          "lon": {
            "nullable": true,
            "type": "number"
          },
          "name": {
            "description": "Observer display name.",
            "type": "string"
          },
          "positionSource": {
            "description": "Where lat/lon came from: \"real\" (own GPS, matched by pubkey or name), \"iata\" (the configured IATA code's centroid, only because no real position exists), or \"none\" (lat/lon are nil). Omitted when positioned via the approx neighbor-centroid estimate instead (#381).",
            "enum": [
              "real",
              "iata",
              "none"
            ],
            "type": "string"
          },
          "publicKey": {
            "description": "Observer's mesh pubkey, when it has one (some bridge-type observers publish under a device name instead -- see the name-match fallback in getPacketPath). Empty otherwise.",
            "type": "string"
          },
          "role": {
            "description": "Observer's own node role (e.g. repeater, room), when it's known as a mesh node itself -- not just an MQTT/API listener.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PacketPathPoint": {
        "description": "One hop's position along a packet's resolved relay path.",
        "properties": {
          "approx": {
            "description": "True when lat/lon are not this node's own position but a count-weighted centroid of its positioned neighbor_edges neighbors instead -- a last-resort stand-in, not a real fix.",
            "type": "boolean"
          },
          "approxNeighborCount": {
            "description": "Present only when approx=true. How many positioned neighbors fed the centroid -- a rough confidence signal, higher is more confident.",
            "type": "integer"
          },
          "approxSpreadKm": {
            "description": "Present only when approx=true and approxNeighborCount\u003e1. Widest distance (km) between any two contributing neighbors -- larger means they disagree more about where 'nearby' is.",
            "nullable": true,
            "type": "number"
          },
          "lat": {
            "description": "Null when this node has never advertised a GPS position and has no positioned neighbor either.",
            "nullable": true,
            "type": "number"
          },
          "lon": {
            "nullable": true,
            "type": "number"
          },
          "name": {
            "description": "Node display name, or its public key if unnamed.",
            "type": "string"
          },
          "publicKey": {
            "description": "Node public key (hex).",
            "type": "string"
          },
          "role": {
            "description": "Node role (e.g. repeater, room), when known.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PacketPathResponse": {
        "properties": {
          "airtimeRelayCount": {
            "description": "Distinct relay count behind estimatedAirtimeMs. Present only alongside it.",
            "type": "integer"
          },
          "branches": {
            "description": "One branch per distinct station that observed the packet, each kept at that station's own deepest observation, sorted deepest-first -- shows the full flood spread, not just the single farthest route.",
            "items": {
              "$ref": "#/components/schemas/PacketPathBranch"
            },
            "type": "array"
          },
          "estimatedAirtimeMs": {
            "description": "Estimated LoRa Time-on-Air (milliseconds) x distinct-relay-count for this packet's whole flood -- same formula as the Relay Airtime Share analytics metric (issue #1768), applied to a single packet. Assumes the configured/default LoRa PHY preset; relay count is inferred from the union of every hearing station's resolved relay path, not a literal per-retransmission log. Omitted when the in-memory store doesn't have this transmission (DB-only mode, or evicted).",
            "nullable": true,
            "type": "number"
          },
          "first": {
            "$ref": "#/components/schemas/PacketPathBranch"
          },
          "hash": {
            "description": "The packet hash this path was resolved for.",
            "type": "string"
          },
          "touchedAreas": {
            "description": "Every configured area any point or observer on the path falls in, deduped and alphabetized by label. Omitted when no areas are configured or none resolved.",
            "items": {
              "$ref": "#/components/schemas/TouchedAreaShape"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "PingLeaderboardEntry": {
        "properties": {
          "count": {
            "description": "How many distinct pings this entry earned credit for.",
            "type": "integer"
          },
          "name": {
            "description": "Display name, falling back to the raw pubkey when unresolved.",
            "type": "string"
          },
          "pubkey": {
            "description": "The node/observer's pubkey.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PingScore": {
        "description": "One ping's computed highscore-relevant stats, derived from the same getPacketPath + airtime-annotation logic behind /api/packets/{hash}/path.",
        "properties": {
          "airtimeMs": {
            "description": "Estimated LoRa Time-on-Air x distinct-relay-count for this ping's whole flood -- same estimate as /api/packets/{hash}/path's estimatedAirtimeMs.",
            "nullable": true,
            "type": "number"
          },
          "channelHash": {
            "description": "Which channel the ping was sent on.",
            "type": "string"
          },
          "deepestHops": {
            "description": "Most relay hops any station's observation of this ping took.",
            "type": "integer"
          },
          "deepestNodeName": {
            "description": "Name of the station behind deepestHops.",
            "type": "string"
          },
          "deepestNodePubkey": {
            "description": "Pubkey of the station behind deepestHops.",
            "type": "string"
          },
          "farthestKm": {
            "description": "Farthest any hearing station was from whoever heard it first, in km. Omitted when no station on this ping's path has a known position.",
            "nullable": true,
            "type": "number"
          },
          "farthestNodeName": {
            "description": "Name of the station behind farthestKm.",
            "type": "string"
          },
          "farthestNodePubkey": {
            "description": "Pubkey of the station behind farthestKm.",
            "type": "string"
          },
          "hash": {
            "description": "The winning ping's hash; use /api/ping-scores/{hash}/path with its record slot for saved View Path evidence.",
            "type": "string"
          },
          "kmPerSecondAirtime": {
            "description": "farthestKm / (airtimeMs/1000) -- geographic distance covered per second of estimated RF airtime spent relaying this ping. Only set when both farthestKm and airtimeMs (with relayCount\u003e0) are available.",
            "nullable": true,
            "type": "number"
          },
          "relayCount": {
            "description": "Distinct relay count behind airtimeMs. Present only alongside it.",
            "type": "integer"
          },
          "sender": {
            "description": "Display name of whoever sent the ping, when resolvable from the channel message.",
            "type": "string"
          },
          "spreadSeconds": {
            "description": "How long the flood took to finish reaching every station it ever reached. Omitted when fewer than 2 stations heard it, or no station has timing data.",
            "nullable": true,
            "type": "number"
          },
          "stationCount": {
            "description": "Distinct stations that heard this ping.",
            "type": "integer"
          },
          "timestamp": {
            "description": "RFC3339 timestamp the ping was first seen.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PingScorePathResponse": {
        "type": "object",
        "properties": {
          "capturedAt": {
            "type": "string",
            "description": "UTC archive capture time, present for archived geometry."
          },
          "path": {
            "$ref": "#/components/schemas/PacketPathResponse"
          },
          "reason": {
            "type": "string",
            "enum": [
              "raw_data_expired_before_capture",
              "no_coordinates",
              "privacy_filtered",
              "archive_too_large",
              "record_evidence_unavailable"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "live",
              "archived",
              "unavailable",
              "initializing"
            ]
          }
        }
      },
      "PingScoresResponse": {
        "description": "The ping-score highscore board: current records plus leaderboards, global (not scoped by region/area).",
        "properties": {
          "farthestPing": {
            "$ref": "#/components/schemas/PingScore"
          },
          "fastestSpreadPing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PingScore"
              }
            ],
            "description": "The fastest full spread among pings heard by at least 2 stations -- a lone station is trivially \"instant\" and is excluded so it can't win this record for nothing."
          },
          "generatedAt": {
            "description": "RFC3339 timestamp this snapshot was computed.",
            "type": "string"
          },
          "mostEfficientPing": {
            "$ref": "#/components/schemas/PingScore"
          },
          "mostHopsPing": {
            "$ref": "#/components/schemas/PingScore"
          },
          "observerLeaderboard": {
            "description": "Top observers ranked by number of pings they were the first station to hear.",
            "items": {
              "$ref": "#/components/schemas/PingLeaderboardEntry"
            },
            "type": "array"
          },
          "relayLeaderboard": {
            "description": "Top nodes ranked by number of distinct pings they appeared as a relay hop in (deduped per ping first, so one busy ping's many branches can't over-credit a relay).",
            "items": {
              "$ref": "#/components/schemas/PingLeaderboardEntry"
            },
            "type": "array"
          },
          "senderLeaderboard": {
            "description": "Top senders ranked by number of pings sent in the last 30 days (unlike the other leaderboards and records, which are all-time). Keyed by the sender display name from the channel message itself -- no resolved pubkey, so entries never carry one.",
            "items": {
              "$ref": "#/components/schemas/PingLeaderboardEntry"
            },
            "type": "array"
          },
          "thisWeek": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WeeklyPingRecords"
              }
            ],
            "description": "The same 5 records as above, scoped to the trailing 7 days instead of all-time. Omitted when no ping in the last 7 days resolved to a usable score."
          },
          "totalPings": {
            "description": "Total ping-bot-triggering messages ever seen, whether or not each one resolved to a usable score.",
            "type": "integer"
          },
          "widestSpreadPing": {
            "$ref": "#/components/schemas/PingScore"
          }
        },
        "type": "object"
      },
      "RegionsObservedCoverage": {
        "type": "object",
        "properties": {
          "complete": {
            "type": "boolean",
            "description": "Retained in-memory history covers the requested interval; not an observer uptime guarantee."
          },
          "loading": {
            "type": "boolean",
            "description": "Startup loading state when this snapshot was captured."
          },
          "start": {
            "type": "string",
            "description": "Known retained-history floor (RFC3339), or null when unknown.",
            "nullable": true
          }
        }
      },
      "RegionsObservedNode": {
        "type": "object",
        "properties": {
          "lat": {
            "type": "number",
            "nullable": true
          },
          "lon": {
            "type": "number",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "positionSource": {
            "type": "string",
            "description": "Self-reported usable node coordinates or no usable position; no neighbor estimates.",
            "enum": [
              "reported",
              "none"
            ]
          },
          "publicKey": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "repeater",
              "room"
            ]
          },
          "scopes": {
            "type": "array",
            "description": "At most 32 newest valid scope timestamps, filtered to the requested interval and sorted by name.",
            "items": {
              "$ref": "#/components/schemas/RegionsObservedScope"
            }
          }
        }
      },
      "RegionsObservedResponse": {
        "type": "object",
        "properties": {
          "coverage": {
            "$ref": "#/components/schemas/RegionsObservedCoverage"
          },
          "generatedAt": {
            "type": "string",
            "description": "Shared relay snapshot time (RFC3339)."
          },
          "nodes": {
            "type": "array",
            "description": "At most 5000 eligible visible relays, including nodes without positions, sorted by public key.",
            "items": {
              "$ref": "#/components/schemas/RegionsObservedNode"
            }
          },
          "scopesTruncated": {
            "type": "boolean",
            "description": "A returned node's retained scope evidence exceeded the 32-scope limit."
          },
          "truncated": {
            "type": "boolean",
            "description": "Additional eligible visible nodes were omitted."
          },
          "window": {
            "type": "string",
            "enum": [
              "1h",
              "24h",
              "7d"
            ]
          },
          "windowEnd": {
            "type": "string",
            "description": "Equals generatedAt."
          },
          "windowStart": {
            "type": "string"
          }
        }
      },
      "RegionsObservedScope": {
        "type": "object",
        "properties": {
          "lastRelayed": {
            "type": "string",
            "description": "Latest confirmed non-future scoped relay timestamp (RFC3339)."
          },
          "name": {
            "type": "string",
            "description": "Exact observed scope spelling and case."
          }
        }
      },
      "RepeaterUnscopedHopDepth": {
        "description": "One repeater/room's hop-count profile across the unscoped (plain FLOOD, non-advert) traffic it has relayed.",
        "properties": {
          "count": {
            "description": "Number of unscoped relay-hop instances at this node.",
            "type": "integer"
          },
          "maxHops": {
            "type": "integer"
          },
          "medianHops": {
            "type": "number"
          },
          "minHops": {
            "type": "integer"
          },
          "name": {
            "description": "Node's display name, or its public key if unnamed.",
            "type": "string"
          },
          "publicKey": {
            "description": "Node's public key.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "RouteMaskBackfillStatus": {
        "type": "object",
        "description": "The ingestor's transmissions.route_mask backfill (#89). Until complete, rows without a mask are classified by their first-inserted route_type, so route classes are provisional.",
        "properties": {
          "remaining": {
            "type": "integer",
            "description": "Rows still without a mask; null when it cannot be counted cheaply.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "backfilling",
              "complete"
            ]
          }
        }
      },
      "SuspiciousGPSNode": {
        "description": "One node whose self-reported lat/lon sits more than GPSSanitySuspectKm from the weighted centroid of its trusted RF-neighbor cluster.",
        "properties": {
          "clusterLat": {
            "description": "Weighted-centroid latitude of the trusted neighbor cluster.",
            "type": "number"
          },
          "clusterLon": {
            "description": "Weighted-centroid longitude of the trusted neighbor cluster.",
            "type": "number"
          },
          "clusterSize": {
            "description": "How many neighbors fed the cluster centroid.",
            "type": "integer"
          },
          "clusterSpreadKm": {
            "description": "Max distance between any two cluster members -- a confidence signal, tighter is more trustworthy.",
            "type": "number"
          },
          "distanceKm": {
            "description": "Distance between the node's own position and its cluster centroid -- always \u003e GPSSanitySuspectKm for a flagged node.",
            "type": "number"
          },
          "lat": {
            "description": "The node's own self-reported latitude.",
            "type": "number"
          },
          "lon": {
            "description": "The node's own self-reported longitude.",
            "type": "number"
          },
          "name": {
            "description": "Display name, falling back to the raw pubkey when unresolved.",
            "type": "string"
          },
          "publicKey": {
            "description": "The node's pubkey.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "TouchedAreaShape": {
        "description": "One configured area's display label plus its drawn boundary, for shading directly on the map. Exactly one of polygon or the latMin/latMax/lonMin/lonMax quartet is present, matching however the area itself was configured.",
        "properties": {
          "label": {
            "description": "The area's display label (e.g. \"Aarhus by\").",
            "type": "string"
          },
          "latMax": {
            "nullable": true,
            "type": "number"
          },
          "latMin": {
            "description": "Present only when the area was configured as a bounding box rather than a polygon.",
            "nullable": true,
            "type": "number"
          },
          "lonMax": {
            "nullable": true,
            "type": "number"
          },
          "lonMin": {
            "nullable": true,
            "type": "number"
          },
          "polygon": {
            "description": "Ordered [lat, lon] pairs tracing the area's drawn boundary. Present only when the area was configured with a polygon rather than a bounding box.",
            "items": {
              "items": {
                "type": "number"
              },
              "maxItems": 2,
              "minItems": 2,
              "type": "array"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "UnknownScopeEntry": {
        "description": "A region-scope name seen in a reported neighbor scope list that isn't part of this deployment's configured hashRegions.",
        "properties": {
          "count": {
            "description": "Number of distinct neighbors (by display name, falling back to pubkey) that reported this scope.",
            "type": "integer"
          },
          "examples": {
            "description": "Up to 5 example neighbor display names/pubkeys that reported this scope.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "scope": {
            "description": "The scope name (e.g. \"#dk-storkbh\"), always #-prefixed.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "WeeklyPingRecords": {
        "description": "Mirrors PingScoresResponse's 5 all-time record slots, scoped to the trailing 7 days -- an achievable target that resets on its own, instead of a slot that locks in forever once someone sets a big all-time record.",
        "properties": {
          "farthestPing": {
            "$ref": "#/components/schemas/PingScore"
          },
          "fastestSpreadPing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PingScore"
              }
            ],
            "description": "Same \u003e=2-station rule as the all-time fastestSpreadPing, applied within the 7-day window."
          },
          "mostEfficientPing": {
            "$ref": "#/components/schemas/PingScore"
          },
          "mostHopsPing": {
            "$ref": "#/components/schemas/PingScore"
          },
          "widestSpreadPing": {
            "$ref": "#/components/schemas/PingScore"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "in": "header",
        "name": "X-API-Key",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "description": "MeshCore network analyzer — packet capture, node tracking, and mesh analytics. An unrecognized /api or /api/* path returns 404; a documented path called with an unsupported method returns 405 with an Allow header. Both are JSON (#233). POST /api/decode and POST /api/packets/observations cap their request body in bytes before parsing it and answer 413 with the ApiError body when it is over the cap (#334); the other body-taking endpoints bound their body on the JSON decoder instead, which is weaker and reports an over-cap body as 400 — docs/api-spec.md lists every cap, how it is enforced, and its status. HEAD is served on every GET path.",
    "license": {
      "name": "MIT"
    },
    "title": "CoreScope API",
    "version": "v0.2.10"
  },
  "openapi": "3.0.3",
  "paths": {
    "/api/admin/antenna-claims": {
      "get": {
        "description": "Returns {claims, enabled, autoApprove}, newest first, at most 1000. Each claim has id, pubkey, name, role, heightOp and detailsOp (set or clear; absent for a part the claim does not carry), heightM (set only when heightOp is set), details (station details, when detailsOp is set), heightInForce and detailsInForce (which parts of an approved claim are still served; a part a newer approved claim replaced is not), contactAdmin (admin only; never in a public response; listed for proven and approved claims only), status, needsReview (the height is more than antennaClaims.reviewDeltaM metres above the cached surface estimate + 2 m, or more than 2 m below the surface), createdAt, expiresAt, provenAt, proofHash, proofLat, proofLon, reviewedAt, approvedBy (auto, admin or owner), movedM and stale (the node moved more than antennaClaims.staleMoveM metres from the proof position; its height is then not used). Codes are never listed. Claims of hidden nodes are left out. Optional status filter.",
        "parameters": [
          {
            "description": "pending, proven, approved, rejected, revoked, expired or superseded",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "List antenna height claims",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/antenna-claims/{id}/approve": {
      "post": {
        "description": "Queues the approval of the whole claim and returns 202 {requestId}; 409 unless the claim is proven, or when an approved claim proven later already carries one of its parts. The approved height becomes the node's owner antenna height in terrain profiles (below the operator's per-node height, above the surface-model estimate) and the approved details the node's station details; each replaces only the same part of the node's previous claims (a replaced details part loses its contacts).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Approve a proven antenna height claim",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/antenna-claims/{id}/reject": {
      "post": {
        "description": "Queues the rejection of the whole claim and returns 202 {requestId}; 409 unless the claim is pending or proven. Its contacts are deleted.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Reject an antenna height claim",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/antenna-claims/{id}/revoke": {
      "post": {
        "description": "Queues the revocation of the whole claim and returns 202 {requestId}; 409 unless the claim is approved. Its contacts are deleted and nothing older comes back: profiles fall back to the next antenna source and the node has no station details, within 30 s.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Revoke an approved antenna height claim",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/channel-proposals": {
      "get": {
        "description": "Returns {proposals, enabled}, newest first, bounded. A proposal whose name the ingestor already decrypts through its built-in/config list (rainbow table, hashChannels, channelKeys) carries builtIn: true. A proposal whose name differs from another proposal's or a built-in name only by letter case carries nearDuplicateOf: [those names] — a hint, not a merge: hashtag keys are derived from the exact bytes of the name (sha256 of \"#name\"), so #HelloWorld and #helloworld are different channels and stay separate proposals. The hint also sees proposals outside the status filter. An approved proposal carries approvedBy: auto (the autoApprove policy) or admin (#616); it is omitted on other statuses and until the ingestor has added channel_proposals.approved_by, and for approvals from before that migration it is inferred (approved within 60s of the suggestion = auto). Optional status filter.",
        "parameters": [
          {
            "description": "pending, approved, rejected or revoked",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "List channel suggestions",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/channel-proposals/{id}/approve": {
      "post": {
        "description": "Queues the approval and returns 202 {requestId}. Approved channels are decrypted by the ingestor and listed for everyone.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Approve a channel suggestion",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/channel-proposals/{id}/reject": {
      "post": {
        "description": "Queues the rejection and returns 202 {requestId}.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Reject a channel suggestion",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/channel-proposals/{id}/revoke": {
      "post": {
        "description": "Undoes a previous approval: the ingestor stops decrypting the channel and it drops out of GET /api/channels' approvedChannels. The channel also leaves GET /api/channels (#251) unless the ingestor still decrypts that name through its built-in/config list. Historical messages already decoded and stored are NOT deleted: they stay readable per channel (GET /api/channels/{hash}/messages), and the channel returns to the list, with its history, if the suggestion is approved again. Synchronous precondition check: 202 {requestId} only when the proposal is currently approved; 409 (no side effect, nothing queued) when it is not.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Revoke an approved channel suggestion",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/prune-geo-filter": {
      "post": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/admin/prune-geo-filter"
      }
    },
    "/api/admin/prune-geo-filter/status": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/admin/prune-geo-filter/status"
      }
    },
    "/api/admin/region-scopes": {
      "get": {
        "description": "Admin-only status of observed OTA region-scope names. config.json and hashRegionsPath remain the baseline; approved names form a persistent overlay.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "List region-scope decisions",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/region-scopes/approve": {
      "post": {
        "description": "Body {name}; queues a decision for the ingestor and returns 202 {requestId}. The scope matches packets received afterwards, and the ingestor then re-matches stored transmissions whose region is still unknown (#380, decode backfill): it only ever fills in an unknown scope, never rewrites one already matched, and abstains when two regions collide on the 16-bit code1. Progress is on /api/healthz under decode_backfill. At most 128 scopes can be approved at once, because every region adds one HMAC per scoped packet and raises the chance of an ambiguous 16-bit code1; at the limit the response is 409 and nothing is queued.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Approve an observed unknown region scope",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/region-scopes/audit": {
      "get": {
        "description": "Admin-only bounded audit trail of the latest 100 scope status changes.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Recent region-scope decisions",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/region-scopes/reject": {
      "post": {
        "description": "Body {name}; queues a rejection for the ingestor. No scope key is activated.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Reject an observed unknown region scope",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/region-scopes/requests/{id}": {
      "get": {
        "description": "Returns queued, approved, rejected, revoked, or error from the ingestor-owned decision queue.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Region-scope decision status",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/region-scopes/revoke": {
      "post": {
        "description": "Body {name}; queues revocation. The scope stops matching packets received afterwards. Stored packets keep the scope they were stored with. Names still configured in config.json or hashRegionsPath remain active.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Revoke an approved region scope",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/analytics/advert-intervals": {
      "get": {
        "description": "#245 M2: the flood and zero-hop advert intervals the nodes run with, estimated per node exactly as node detail's advertIntervals (include=advertRoutes) - the newest 20 flood and 20 zero-hop adverts, the same classifier and estimator, snapped to the firmware's settable values (flood.advert.interval whole hours 3-168, advert.interval even minutes 60-240 or the 2-minute new-install default). Counts only nodes in the node list with at least one ADVERT; hidden identities are left out. Distributions (buckets) hold medium and high confidence estimates; low confidence, irregular, too few and not observed are counted beside them. No zero-hop adverts means the zero-hop interval is 0 (off) or no observer hears the node directly, so it is reported as not observed. Computed once per analytics cycle by a background pass over the database (config analytics.recomputeIntervalSeconds.advertIntervals, #492 pauseWhenIdle applies to it); every request, filtered or not, is answered from that snapshot.",
        "parameters": [
          {
            "description": "Comma-separated region (IATA) codes: only nodes whose sampled adverts an observer in one of them heard.",
            "in": "query",
            "name": "region",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Configured area key: only nodes whose position lies in the area (unknown key: 400).",
            "in": "query",
            "name": "area",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdvertIntervalAnalyticsResponse"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Mesh-wide estimated advert intervals",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/analytics/advert-intervals/bucket": {
      "get": {
        "description": "#896: the nodes one Flood or Zero-hop bucket of GET /api/analytics/advert-intervals counts, by the same rule (medium/high confidence estimates, keyed by interval_s and snapped) over the same snapshot rows and region/area filter. Served from the published analytics snapshot only: 503 before the first one, never a database scan. Identities the instance hides (node or observer blacklist, hidden-name prefix on the node, inactive-node or observer name, checked at serve time) are withheld: counted in withheld, never listed; nodes stays the histogram's count. Sorted by name case-insensitively, then name, then key. These are observed estimates, not confirmed firmware settings.",
        "parameters": [
          {
            "description": "Route class of the distribution.",
            "in": "query",
            "name": "class",
            "required": true,
            "schema": {
              "enum": [
                "flood",
                "zero_hop"
              ],
              "type": "string"
            }
          },
          {
            "description": "The bucket's interval_s (a positive integer; unsnapped buckets can lie above 168 h).",
            "in": "query",
            "name": "interval_s",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "The bucket's snapped.",
            "in": "query",
            "name": "snapped",
            "required": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "As GET /api/analytics/advert-intervals.",
            "in": "query",
            "name": "region",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "As GET /api/analytics/advert-intervals (unknown key: 400).",
            "in": "query",
            "name": "area",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Visible members to skip (default 0).",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Members per page: default 50, at most 200 (larger values are capped).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "generated_at of the snapshot the client paged from; 409 when the published snapshot differs.",
            "in": "query",
            "name": "snapshot",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdvertIntervalBucketResponse"
                }
              }
            },
            "description": "Success"
          },
          "409": {
            "description": "snapshot= is no longer the published snapshot; the body (AdvertIntervalBucketConflict) carries the current generated_at. Restart from offset 0.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Identity metadata could not be read (fails closed, no list).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "No analytics snapshot published yet (warming up); Retry-After gives the seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "summary": "Nodes of one advert interval bucket",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/analytics/areas": {
      "get": {
        "description": "Three breakdowns over the drawn-polygon Areas configured via the meshguide.dk sync, distinct from hashRegion scope adoption (see /api/analytics/scope-stats): (1) density, node count/active-degraded-silent health/role mix per area (multi-membership via AreaKeysForPoint, so a node in a sub-area also counts toward its parent region), (2) bridgeNodes, nodes whose packet-derived neighbor_edges reach into at least one OTHER area (single most-specific area via AreaKeyForPoint), ranked by how many other areas they reach -- distinct from the network-wide, area-unaware bridge_score betweenness centrality, (3) positionGaps, per area how many nodes have a real GPS fix vs. how many were only placeable via the same neighbor-centroid estimate View Path's approx markers use (nearestPositionedNeighbor, geo-sanity-filtered by Config.NeighborMaxEdgeKm so a stray MQTT-bridge observer↔last-hop edge hundreds of km away can't skew the estimate or inflate its spreadKm). estimatedNodes is the flat, network-wide list backing positionGaps' approximated counts, with actual estimated coordinates -- used by the Areas tab's \"View Estimated Nodes\" map view and Tools \u003e Position-Fix Coverage Gaps. Returns an empty response if no Areas are configured. Cached 30s.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AreaAnalyticsResponse"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Per-configured-Area node density, cross-area bridge nodes, and position-fix coverage",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/analytics/channels": {
      "get": {
        "description": "Message counts and activity per channel.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Channel analytics",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/analytics/distance": {
      "get": {
        "description": "Geographic distance calculations between nodes.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Distance analytics",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/analytics/gps-sanity": {
      "get": {
        "description": "The neighbor-centroid technique nearestPositionedNeighbor uses to ESTIMATE a position for a node with no GPS, flipped around to sanity-check a node that DOES report one. For each node with a real (non-zero) GPS fix, takes its strongest neighbor_edges neighbor as an anchor, keeps whichever other positioned neighbors agree with the anchor within GPSSanityClusterTightKm (50km), and -- only if at least GPSSanityMinClusterSize (2) survive that filter -- compares the node's own position against their weighted centroid. Flags it when the distance exceeds GPSSanitySuspectKm (100km). Most nodes are skipped, not evaluated (no neighbor_edges, no positioned neighbor, or too scattered a neighbor set to trust), so evaluated is always well under totalRealGps. v1: doesn't weight by neighbor_edges' hash-prefix ambiguity mode (the confidence indicator public/nodes.js's Neighbors panel shows) since that breakdown only lives in the in-memory NeighborGraph, not the persisted table this reads. Not area-scoped -- works regardless of whether Areas are configured. Cached 30s.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GPSSanityResponse"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Nodes whose self-reported GPS disagrees with their own RF neighbors",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/analytics/hash-collisions": {
      "get": {
        "description": "Identifies nodes sharing hash prefixes.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Hash collision detection",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/analytics/hash-sizes": {
      "get": {
        "description": "Distribution of hash prefix sizes across the network.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Hash size analysis",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/analytics/hop-depth": {
      "get": {
        "description": "Answers three flood-containment questions in one pass over resolved relay paths, using the same 0-based per-node path-index hop count as /api/nodes/{pubkey}/hop_analytics (issue #1812), not the unrelated observer-distance hopDistribution field: (1) does scoped (TRANSPORT_FLOOD/TRANSPORT_DIRECT) traffic actually travel fewer hops network-wide than unscoped (plain FLOOD, non-advert) traffic, (2) which repeater/room nodes are relaying unscoped flood traffic that already traveled far (high hops, a stronger containment-problem signal) vs merely locally (low hops), and (3) is that containment trending better or worse over the window (timeSeries). Plain DIRECT traffic never undergoes flood propagation and is excluded throughout. Cached 30s per window.",
        "parameters": [
          {
            "description": "Time window: 1h, 24h (default), or 7d",
            "in": "query",
            "name": "window",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HopDepthAnalyticsResponse"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Network-wide hop-depth analytics",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/analytics/neighbor-graph": {
      "get": {
        "description": "Full neighbor affinity graph for visualization.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Neighbor graph",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/analytics/network-digest": {
      "get": {
        "description": "Tools \u003e Network Digest. \"What happened lately\" at a glance: new-node count, role/name changes, position moves, resurrections, and a ranked breakdown of new-node activity by area, all within the requested window (default 7d). Built on top of /api/analytics/new-nodes and /api/analytics/node-changes -- exact up to 500 rows fetched from each (see newNodesCapped/changesCapped on the response). areaBreakdown counts each new node toward its single most specific configured area (smallest bounding box on overlap), not every area its position happens to fall in -- an umbrella area covering a whole country/continent would otherwise \"win\" on virtually every window regardless of where the activity actually concentrated.",
        "parameters": [
          {
            "description": "Time window, e.g. \"24h\", \"7d\", \"30d\" (default 7d)",
            "in": "query",
            "name": "window",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "\"all\" (default), \"domestic\", or \"foreign\" -- same nodes.foreign_advert flag as Tools \u003e New Nodes' toggle. Narrows every count (and areaBreakdown) to nodes/changes matching that origin; node_changes rows are matched via the node's current foreign_advert, since the audit log doesn't store its own snapshot of it.",
            "in": "query",
            "name": "origin",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetworkDigest"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Rolling-window summary of New Nodes + Node Changes activity",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/analytics/new-nodes": {
      "get": {
        "description": "Tools \u003e New Nodes. Newest first, each with its configured area(s) (same touched-areas matching View Path/Ping Scores' Area Activity draw from). Excludes nodes that also appear in inactive_nodes -- a node pruned for inactivity and later returning would otherwise get a freshly-INSERTed nodes.first_seen and misleadingly look brand new; that \"came back after being pruned\" case is its own distinct signal, not covered by this feed. Blacklisted nodes (config.json nodeBlacklist) are excluded. Empty list (not an error) when nothing qualifies.",
        "parameters": [
          {
            "description": "Max entries to return (default 50)",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewNodesResponse"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Most recently first-seen nodes, network-wide",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/analytics/node-changes": {
      "get": {
        "description": "Tools \u003e Node Changes, a durable audit log written by cmd/ingestor's UpsertNode as ADVERTs arrive (not a periodic snapshot diff, so nothing is missed between polls). changeType is \"role\", \"name\", \"position\" (\u003e=1km move; GPS jitter under that is not logged), or \"resurrected\" (pubkey previously pruned to inactive_nodes for inactivity, now advertising again -- oldValue is its last_seen there before it returned). A field is only compared when both the old and new ADVERT values are present, since adverts routinely omit name/location. Each entry also carries the node's CURRENT role and foreign_advert (resolved live, not a historical snapshot) for the Tools page's role and All/Domestic/Foreign filters. Newest first. Blacklisted nodes excluded. Empty list (not an error) when nothing has been logged yet.",
        "parameters": [
          {
            "description": "Max entries to return (default 50)",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NodeChangesResponse"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Recent node role/name/position changes and pruned-node returns",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/analytics/observer-comparison": {
      "get": {
        "description": "Descriptive packet-overlap comparison between one reference observer and one or more other observers (#122). Computed server-side from every eligible RX observation.timestamp in [window.start, window.end) -- not from a client-side packet-list sample, and not from transmissions.first_seen -- so a transmission re-observed inside the window counts even if first seen earlier. Each transmission_id counts once per observer regardless of how many paths/observations reached it; TX and any non-RX/unknown direction are excluded. rows[].referenceCoveragePct/otherCoveragePct are null (not 0) when their denominator is zero. No SNR/RSSI comparison and no health classification -- counts and percentages only. Bounded to observerComparisonMaxObservers (40) compared observers per request and cached 30s per (ref, hours, observer set).",
        "parameters": [
          {
            "description": "Reference observer id (required)",
            "in": "query",
            "name": "ref",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Window size: 1, 6, or 24 (required)",
            "in": "query",
            "name": "hours",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Comma-separated ids of the other observers to compare against the reference (required, 1-40, must not include ref)",
            "in": "query",
            "name": "observers",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Reference-to-many observer comparison",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/analytics/relay-airtime-share": {
      "get": {
        "description": "Overview tab's Relay Airtime Share. Each distinct packet (deduplicated by content hash) scores LoRa Time-on-Air of its raw bytes × distinct repeaters that relayed it, under the assumed preset returned in preset (config analytics.loraPreset); originator TX is excluded. rows[] = {payload_type, type, route_class, count, count_pct, score, airtime_pct}, sorted by airtime_pct desc. type is the numeric payload type; payload_type is a display label and may change. ADVERT is split into up to four rows that all have type 4, classified from transmissions.route_mask (every raw route type observed for the content hash, independent of ingest order): route_class \"flood\" (only route 0/1 seen, label \"ADVERT (flood)\"), \"zero_hop\" (only route 2/3, label \"ADVERT (zero-hop)\"), \"mixed\" (the same payload was seen on both flood and zero-hop routes, e.g. a contact re-shared as a zero-hop advert; label \"ADVERT (mixed)\"; counted once, with all of its relays) and \"legacy\" (no usable route, label \"ADVERT\"; node detail's route_class calls the same bucket \"unknown\", one classifier). Rows whose route_mask is not backfilled yet fall back to the legacy first-inserted route_type; route_mask_backfill {status: pending|backfilling|complete, remaining} reports whether that fallback is still in use: complete only when no transmission lacks a mask and this server has read every backfilled mask (the server picks them up while running); remaining counts rows without a mask, or, once none are left, an upper bound on the transmissions this server has not re-read yet (null while it cannot be counted). route_class is null on every other row, so key rows by (type, route_class), never by type alone. Time-on-Air uses the frame of the first inserted observation, so its length (path bytes, transport codes) can still depend on ingest order. count_pct and airtime_pct are shares of total_count and total_score (nanoseconds). Payload Type Mix (/api/analytics/rf payloadTypes) is not split. Cached in the RF analytics cache (60s default).",
        "parameters": [
          {
            "description": "Relative window: 1h, 24h/1d, 3d, 7d/1w or 30d (default: all loaded packets)",
            "in": "query",
            "name": "window",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "RFC3339 start; if from or to is given, window is ignored (an unparseable value leaves that bound open)",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "RFC3339 end; if from or to is given, window is ignored (an unparseable value leaves that bound open)",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Relay airtime share per payload type",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/analytics/rf": {
      "get": {
        "description": "SNR/RSSI distributions and statistics.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "RF analytics",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/analytics/roles": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/analytics/roles"
      }
    },
    "/api/analytics/subpath-detail": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Subpath detail",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/analytics/subpaths": {
      "get": {
        "description": "Common routing subpaths through the mesh.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Subpath analysis",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/analytics/subpaths-bulk": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Bulk subpath analysis",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/analytics/topology": {
      "get": {
        "description": "Hop-count distribution and route analysis.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Network topology",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/analytics/wardriving": {
      "get": {
        "description": "Activity/entry-point/coverage/signal/session analytics for the #wardriving channel (or another channel via ?channel=): message volume over time, top senders, path[0] entry-point hash-prefix tallies (resolve names via /api/resolve-hops), per-observer coverage (not the sender's — MeshMapper's wardriving messages normally carry an anonymous session token, not live GPS; each observer's coordinates prefer its own real node position, falling back to its configured IATA/region code's centroid only when no real position is known, with positionSource (\"real\"/\"iata\"/\"none\") marking which applies — #381), average SNR/RSSI over the same time buckets as the activity series, each sender's messages grouped into distinct sessions/runs (split on a 15-minute gap, each with an AirtimeMs field — LoRa Time-on-Air × distinct relaying repeaters, same formula as the Overview tab's Relay Airtime Share, omitted in DB-only mode), and any senders who explicitly shared their own position (some clients append plaintext \"\u003clat\u003e,\u003clon\u003e\" after the token — a deliberate choice by that sender, confirmed empirically, not something CoreScope infers). Cached 30s per window+channel.",
        "parameters": [
          {
            "description": "Time window: 1h, 24h (default), or 7d",
            "in": "query",
            "name": "window",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Channel name to analyze (default #wardriving)",
            "in": "query",
            "name": "channel",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Wardriving channel analytics",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/analytics/wardriving/sender-messages": {
      "get": {
        "description": "Individual #wardriving messages from one sender (drill-down behind Top Senders/Sessions): each message's entry-point path (path[0] first, resolve names via /api/resolve-hops), per-observer SNR/RSSI, and lat/lon when that message carried an explicit shared position. Pass since+until (RFC3339) to scope to one session's exact range; otherwise window covers the sender's whole activity in that period. Capped at 200 messages, most-recent-first. Not cached.",
        "parameters": [
          {
            "description": "Sender display name to look up (required, exact match)",
            "in": "query",
            "name": "sender",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Channel name (default #wardriving)",
            "in": "query",
            "name": "channel",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Time window when since/until aren't given: 1h, 24h (default), or 7d",
            "in": "query",
            "name": "window",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "RFC3339 start time — overrides window when paired with until",
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "RFC3339 end time — overrides window when paired with since",
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Wardriving sender message drill-down",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/antenna-claims/config": {
      "get": {
        "description": "Returns {enabled, detailsEnabled, pollInitialMs, pollBackoff, pollMaxMs, pollMaxAttempts, adminDefaultFilter}: whether owners can claim a node's antenna height (requires antennaClaims.enabled and a strong apiKey), the same gate as POST /api/nodes/{pubkey}/antenna-claims, whether they can also set station details (antennaClaims.detailsEnabled on top of that), and the operator's antennaClaims settings for the claim status polling (first delay, growth factor, cap per delay, number of checks) and the admin queue's first filter.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Antenna height claim availability",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/antenna-claims/requests/{requestId}": {
      "get": {
        "description": "Returns {status: queued|pending|proven|approved|rejected|revoked|expired|superseded|error, expiresAt, error}. The request id is the capability; the code is never returned here. A claim whose node is hidden answers like an unknown one (404).",
        "parameters": [
          {
            "in": "path",
            "name": "requestId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Status of an antenna height claim",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/audio-lab/buckets": {
      "get": {
        "description": "Returns frequency bucket data for audio analysis.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Audio lab frequency buckets",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/backup": {
      "get": {
        "description": "Streams a consistent SQLite snapshot of the analyzer DB (VACUUM INTO). Response is application/octet-stream with attachment filename corescope-backup-\u003cunix\u003e.db.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Download SQLite backup",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/channel-proposals": {
      "post": {
        "description": "Body {name}, exactly one JSON object without other fields. Only public hashtag channel names (at most 31 UTF-8 bytes including #, case preserved, no control, line-separator or invisible formatting characters) are accepted — never keys. Returns 202 {requestId}; 400 invalid body or name, 403 disabled, 429 rate limited, 503 queue full (both with Retry-After).",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Suggest a public hashtag channel",
        "tags": [
          "channels"
        ]
      }
    },
    "/api/channel-proposals/config": {
      "get": {
        "description": "Returns {enabled}: whether public suggestions are open (requires channelProposals.enabled and a strong apiKey).",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Channel suggestion availability",
        "tags": [
          "channels"
        ]
      }
    },
    "/api/channel-proposals/requests/{requestId}": {
      "get": {
        "description": "Returns {status: queued|pending|approved|rejected|revoked|error, proposal: {id, name, status, createdAt, reviewedAt}, error, builtIn}. builtIn is true when the ingestor already decrypts the name through its built-in/config list. 404 when unknown or expired (24h).",
        "parameters": [
          {
            "in": "path",
            "name": "requestId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Status of a suggestion or review request",
        "tags": [
          "channels"
        ]
      }
    },
    "/api/channels": {
      "get": {
        "description": "Returns known mesh channels with message counts. approvedChannels ([{name, hash}]) lists the shared hashtag channels an administrator approved, even before they carry traffic; omitted when empty. A channel with stored messages whose shared-channel proposal is not approved (revoked, suggested again and pending, or that re-suggestion rejected) is left out of the list (#251), unless the ingestor also decrypts that name through its built-in/config list (rainbow table, hashChannels, channelKeys); only approving the proposal lists it again, with its history. hiddenChannels ([string], omitted when empty) names the channels left out, so the page does not re-create their rows from live packets; it only names channels that have stored messages (never an unreviewed suggestion), it is global and not filtered by region, and another open tab keeps the set it last loaded, also after a re-approval. The messages stay readable per channel (GET /api/channels/{hash}/messages) and nothing is deleted. Decided per channel with stored messages from a short-lived snapshot of the proposals table (10s, dropped early when an approve/revoke result is read), never a per-request query and without a row cap. When the ingestor's built-in names file is missing or unreadable nothing is hidden. GET /api/analytics/channels is not filtered and still counts these channels.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "List channels",
        "tags": [
          "channels"
        ]
      }
    },
    "/api/channels/{hash}/messages": {
      "get": {
        "description": "Returns messages for a specific channel. The {hash} path parameter is the existing channel route key: the operator-assigned channel name for a decrypted channel, or \"enc_\u003cHEX\u003e\" for an undecryptable one — it is not the on-wire channel hash. The separate channelHashHex field on each message carries the actual one-byte hash taken from the packet (see the ChannelMessage schema).",
        "parameters": [
          {
            "description": "Max messages to return",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Pagination offset",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Filter to transmissions observed by an observer in the given region code(s).",
            "in": "query",
            "name": "region",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "hash",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelMessagesResponse"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get channel messages",
        "tags": [
          "channels"
        ]
      }
    },
    "/api/config/areas": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/config/areas"
      }
    },
    "/api/config/areas/polygons": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/config/areas/polygons"
      }
    },
    "/api/config/cache": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get cache configuration",
        "tags": [
          "config"
        ]
      }
    },
    "/api/config/client": {
      "get": {
        "description": "Includes estimatedPositions: {enabled: boolean}, the effective server-startup policy for neighbor-derived position estimates. Missing server configuration defaults to enabled; explicit false suppresses these estimates in node detail, live and archived paths, and estimate-dependent analytics. Reported GPS and independent IATA/name-match observer positioning are unchanged. Restart the server to change the policy.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Client-visible operator configuration",
        "tags": [
          "config"
        ]
      }
    },
    "/api/config/geo-filter": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get geo-filter configuration",
        "tags": [
          "config"
        ]
      },
      "put": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/config/geo-filter"
      }
    },
    "/api/config/map": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get map configuration",
        "tags": [
          "config"
        ]
      }
    },
    "/api/config/regions": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get configured regions",
        "tags": [
          "config"
        ]
      }
    },
    "/api/config/regions/groups": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get configured region quick-pick groups",
        "tags": [
          "config"
        ]
      }
    },
    "/api/config/theme": {
      "get": {
        "description": "Returns color maps, CSS variables, and theme defaults.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get theme configuration",
        "tags": [
          "config"
        ]
      }
    },
    "/api/debug/affinity": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Debug neighbor affinity scores",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/decode": {
      "post": {
        "description": "Decodes a hex-encoded packet without storing it. The request body is capped at 4096 bytes before it is parsed (#334) — a larger body is 413 regardless of its shape or of whether it declares a Content-Length. The largest frame the decoder can accept (header + transport codes + MAX_PATH_SIZE path bytes + MAX_PACKET_PAYLOAD payload bytes) is a ~520-byte body, so the cap leaves roughly 7x headroom.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "413": {
            "description": "Request body over 4096 bytes (#334). Enforced before parsing, on bytes received, so it also applies to a chunked request with no Content-Length.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "summary": "Decode a raw packet",
        "tags": [
          "packets"
        ]
      }
    },
    "/api/dropped-packets": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/dropped-packets"
      }
    },
    "/api/health": {
      "get": {
        "description": "Returns server health, uptime, and memory stats.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Health check",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/healthz": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/healthz"
      }
    },
    "/api/iata-coords": {
      "get": {
        "description": "Returns lat/lon for known airport codes (used for observer positioning).",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get IATA airport coordinates",
        "tags": [
          "config"
        ]
      }
    },
    "/api/known-channels": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/known-channels"
      }
    },
    "/api/map/dhm/ortho/{z}/{x}/{y}": {
      "get": {
        "description": "Read-only proxy for one 256x256 EPSG:3857 JPEG tile of the GeoDanmark spring orthophoto (Ortofoto foraar) from Dataforsyningen's WMTS orto_foraar_webm_DAF, layer orto_foraar_webm, tile matrix set DFD_GoogleMapsCompatible; the server adds its access token. z, x and y are plain decimal tile coordinates on the usual web-mercator grid at zoom 7-20; any other value, or any query string, is 400. The X-CoreScope-Tile header says: hit / miss = from the cache / from upstream (image/jpeg, browser-cached for 24 hours); outside = outside DHM coverage, no upstream call; unavailable = no tile (upstream failure or a body that is not a complete 256x256 JPEG); busy = refused without an upstream call because map tiles are already being fetched server-wide (#744). outside, unavailable and busy return a transparent PNG; unavailable and busy are no-store, and busy is not charged to the per-client budget. Ortho tiles share the hillshade's per-client budget and server-wide upstream limits, and are cached apart from it for 7 days. 404 unless map.dhm is enabled with a token and map.dhm.ortho.enabled. (#728)",
        "parameters": [
          {
            "in": "path",
            "name": "z",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "x",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "y",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "429": {
            "description": "Per-client budget of tiles not in the server cache exceeded; shared with GET /api/map/dhm/wms (map.dhm.tileRateLimitPerMin, default 2400/min; cached and outside-coverage tiles are not counted). Retry-After gives the seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "summary": "Danish orthophoto tile (WMTS proxy)",
        "tags": [
          "config"
        ]
      }
    },
    "/api/map/dhm/wms": {
      "get": {
        "description": "Read-only proxy for one 256x256 EPSG:3857 tile of a Danmarks Hojdemodel overlay from Dataforsyningen; the server adds its access token. layers=terrain, surface, contours or elevation names the overlay, and the server maps it to the upstream layer; no upstream layer name is accepted (#734). elevation is not an upstream layer: the server renders it from one dhm_wcs_DAF GetCoverage of the DTM (dhm_terraen) per tile, zoom 9-13, as a 256x256 paletted PNG coloured by height on a fixed ramp tuned to Danish land (stops 0-175 m, dhm.overlays[].legendM), transparent at 0 m (sea and outside Denmark) and nodata (#792, #860); its styles is the ramp id dhm.overlays[].style, so a new ramp is a new tile URL. terrain is the hillshade described below; surface is dhm_overflade_skyggekort from dhm_DAF, zoom 7-19; contours is dhm_kurve_traditionel from dhm_DAF, zoom 14-19 (2.5 m contour lines). surface, contours and elevation have no fallback: a failed tile is unavailable. layers=dhm_terraen_skyggekort, the #680 value, is an alias of terrain for one release. Accepts exactly service=WMS, request=GetMap, version=1.3.0, one layers value as above, styles=, format=image/png, transparent=true, width=256, height=256, crs=EPSG:3857 and a bbox that is one web-mercator tile at a zoom inside the overlay's range; anything else is 400. map.dhm.layer picks the terrain upstream: exaggerated (default; quickDHM_skyggekort_terraen_overdrevet from wms/dhm_temp, falling back per tile to dhm_terraen_skyggekort when it answers non-200, a wrong content type or an invalid PNG, or the connection fails; not on a timeout or a full upstream budget) or terrain (dhm_terraen_skyggekort only). The X-CoreScope-Tile header says: hit / miss = the overlay's layer from the cache / from upstream; fallback = the exaggerated attempt failed and the terrain tile was fetched upstream; fallback-hit = the exaggerated attempt still went upstream and failed, and the terrain tile came from the cache; outside = outside DHM coverage, no upstream call; unavailable = no tile (transparent, no-store); busy = refused without an upstream call because map tiles are already being fetched server-wide (transparent, no-store, not charged to the per-client budget; #744). Fallback tiles are browser-cached for 10 minutes, other tiles for 24 hours (#687). Tiles outside DHM coverage and upstream failures return a transparent PNG. 404 unless map.dhm is enabled with a token. (#680)",
        "parameters": [
          {
            "description": "must be exactly \"EPSG:3857\"",
            "in": "query",
            "name": "crs",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "must be exactly \"image/png\"",
            "in": "query",
            "name": "format",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "must be exactly \"256\"",
            "in": "query",
            "name": "height",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the overlay id: terrain, surface, contours or elevation; \"dhm_terraen_skyggekort\" is the #680 alias of terrain, accepted for one release",
            "in": "query",
            "name": "layers",
            "required": true,
            "schema": {
              "enum": [
                "terrain",
                "surface",
                "contours",
                "elevation",
                "dhm_terraen_skyggekort"
              ],
              "type": "string"
            }
          },
          {
            "description": "must be exactly \"GetMap\"",
            "in": "query",
            "name": "request",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "must be exactly \"WMS\"",
            "in": "query",
            "name": "service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "must be present and empty, except for layers=elevation: the ramp id from /api/config/client dhm.overlays[].style (\"ramp-471e5e7c\"), or empty for one release (#860)",
            "in": "query",
            "name": "styles",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "must be exactly \"true\"",
            "in": "query",
            "name": "transparent",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "must be exactly \"1.3.0\"",
            "in": "query",
            "name": "version",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "must be exactly \"256\"",
            "in": "query",
            "name": "width",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "minx,miny,maxx,maxy of one EPSG:3857 tile at zoom 7-19",
            "in": "query",
            "name": "bbox",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "429": {
            "description": "Per-client budget of tiles not in the server cache exceeded (map.dhm.tileRateLimitPerMin, default 2400/min; cached and outside-coverage tiles are not counted). Retry-After gives the seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "summary": "DHM overlay tile: hillshade, surface hillshade, contours or colour by elevation (WMS proxy; hillshade exaggerated by default, terrain fallback)",
        "tags": [
          "config"
        ]
      }
    },
    "/api/masts": {
      "get": {
        "description": "Existing antenna positions from Mastedatabasen (Digitaliseringsstyrelsen, CC0) inside one fixed 2 km x 2 km EPSG:25832 grid cell: cell E,N spans easting [E*2000, (E+1)*2000) and northing [N*2000, (N+1)*2000). Rows at identical coordinates are grouped into one site. Response: {cell: {e, n}, truncated, sites: [{lat, lon, street?, houseNumber?, postcode?, city?, stations[], entries: [{technology, bandMHz?, service?, commissioned?, interference}], interference, likelyMast}]}. interference is set when an entry is in the 700, 800 or 900 MHz band or is GSM-R; likelyMast is a heuristic (a broadcast technology), not a fact from the source. truncated is set when upstream returned its 500-row page limit, so the cell may be missing sites. Only published fields appear: no operator, height or structure type. The server fetches a cell from the Mastedatabasen WFS only when it is requested and not cached (7 days); it never prefetches or walks the grid. X-CoreScope-Cache says hit or miss; responses may be browser-cached for 24 hours. Stale-if-error (#872): when Mastedatabasen times out, fails to connect or answers 5xx, or the circuit breaker is open, a cell cached within map.masts.maxStaleDays (default 90) is answered 200 from that copy with X-CoreScope-Cache: stale, X-CoreScope-Masts-Stale: 1 and Cache-Control: no-store; an older cell gets the error below. At most map.masts.upstreamSlots (default 16) requests are open towards Mastedatabasen at once. 404 unless map.masts.enabled. (#724)",
        "parameters": [
          {
            "description": "E,N grid cell indexes as plain decimal integers, E 219-462 and N 3017-3209 (the Danish extent); the only accepted key",
            "in": "query",
            "name": "cell",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Missing, malformed or out-of-extent cell, or any other query key; no upstream call and no charge.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "map.masts is not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Per-client budget of cells not in the cache exceeded (map.masts.cellRateLimitPerMin, default 120/min; cached cells are not counted). Retry-After gives the seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "Mastedatabasen failed or returned something other than a well-formed feature collection; no upstream detail is returned and nothing is cached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "map.masts.maxInFlight uncached cells (default 16) are already being fetched, server-wide; no upstream call and no charge. Requests for a cell already being fetched share that fetch. Retry-After gives the seconds to wait. With header X-CoreScope-Masts-Source: down and body error \"antenna data source unavailable\" it is the circuit breaker instead (#872): after map.masts.breakerFailures consecutive upstream timeouts, connection errors or 5xx (default 3) no uncached cell goes upstream for map.masts.breakerCooldownSec (default 300); Retry-After is the remaining cool-down. Cached cells are still served, and stale ones within map.masts.maxStaleDays are answered 200 instead; no charge.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "504": {
            "description": "Mastedatabasen timed out.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "summary": "Antenna sites of one grid cell (Mastedatabasen, Denmark)",
        "tags": [
          "config"
        ]
      }
    },
    "/api/moments": {
      "get": {
        "description": "The newest moments first, from an in-memory ring of moments.historySize (default 50) entries. The same moments are broadcast on the WebSocket as {\"type\":\"moment\",\"data\":Moment}. Kinds: new_node (a repeater, room or sensor key seen for the first time in retained history: first_seen at most 10 min old and no inactive_nodes row), back_online (a repeater heard again after at least moments.backOnlineHours of silence, or returning from inactive_nodes), record_link (a new longest confident direct neighbor link inside the rolling moments.recordWindowHours, beating the previous record by max(0.5 km, 1 %)), busiest_repeater (the repeater with the most distinct non-advert relays in the last moments.busyWindowMinutes, at least moments.busyMinRelays). Detection runs on existing timers (node delta every 15 s, neighbor-graph swap every 60 s, relay recompute), never per packet; the first look after startup is a silent baseline. Rate limited per kind and globally (moments.maxPerMinute); a tick with more nodes of one kind than its cap allows becomes one moment with more = the rest. Companions never appear; node and observer blacklists and hidden-name prefixes are applied when a moment fires and again on every read; positions are advertised GPS only. An empty list (not an error) when moments are disabled (moments.enabled, default false).",
        "parameters": [
          {
            "description": "Max moments to return (default and maximum moments.historySize)",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MomentsResponse"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Recent live moments (#881)",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/mqtt/status": {
      "get": {
        "description": "Returns per-MQTT-source connection state and counters (lastConnectUnix, lastPacketUnix, packetsTotal, etc.). Broker URL credentials (user-info, query, fragment) are masked in broker and lastError, and in a name that is a raw broker URL. Sourced from the ingestor stats file; empty list when unavailable. stale is true when the file's sampleAt is older than the /api/perf/io freshness threshold (5s) or unreadable, i.e. the rows are frozen; sampleAgeSec gives its age. (#1043, #160)",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "MQTT source status",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/nodes": {
      "get": {
        "description": "Returns all known mesh nodes with status and metadata. Repeater/room rows carry the issue #672 usefulness metrics (traffic_share_score, bridge_score, coverage_score, redundancy_score), the composite usefulness_score + usefulness_grade, and relay-activity counters. See the Node schema.",
        "parameters": [
          {
            "description": "Filter by node role",
            "in": "query",
            "name": "role",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by status (active/stale/offline)",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Overrides the deployment's geo_filter node-list default for this one request: \"1\"/\"true\" excludes nodes outside the configured geo_filter (unless foreign_advert-tagged), \"0\"/\"false\" returns every node regardless. Any other value (including omitting it) uses the deployment default — geo_filter applies to the node list unless config.json sets geoFilterExemptNodeList=true.",
            "in": "query",
            "name": "geoFilter",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Issue #1862. \"true\" keeps only nodes that have ever transported at least one region-scoped (TRANSPORT_FLOOD/DIRECT) packet; \"false\" keeps only nodes that never have. Backed by the same relay-activity signal as the Scopes tab's \"Repeaters Never Relaying Any Scope\" section — pair with role=repeater to match its exact semantics.",
            "in": "query",
            "name": "hasScope",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Issue #1862. Comma-separated region scope name(s) (e.g. \"eu,be\"; leading \"#\" optional, case-insensitive) — keeps only nodes that have transported at least one of them. Combines with hasScope as AND, not OR.",
            "in": "query",
            "name": "hashRegion",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NodeListResponse"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "List nodes",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/nodes/bulk-health": {
      "get": {
        "description": "Returns health status for up to limit nodes in one call, each with its Heard By lists (directObservers / relayObservers, see HeardDirectObserver) and stats.avgSnr over direct receptions only.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkHealthResponse"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Bulk node health",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/nodes/clock-skew": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/nodes/clock-skew"
      }
    },
    "/api/nodes/network-status": {
      "get": {
        "description": "Returns counts of active, stale, and offline nodes.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Network status summary",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/nodes/resolve": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/nodes/resolve"
      }
    },
    "/api/nodes/search": {
      "get": {
        "description": "Search nodes by name or public key prefix.",
        "parameters": [
          {
            "description": "Search query",
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Search nodes",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/nodes/{pubkey}": {
      "get": {
        "description": "Returns full detail for a single node by public key. For repeater/room nodes this includes the issue #672 usefulness axes + composite score/grade (see the Node schema). recentAdverts is the chronological list; with include=advertRoutes, recentAdvertsByRoute and advertCounts (#2073) split the node's adverts into flood / zero_hop / mixed, advertIntervals (#245) estimates the flood and zero-hop advert intervals, and the ADVERT rows of recentAdverts carry route_class. A 404 for a key with no nodes row (#199) is {error, inactive_node?, observer?}: inactive_node {public_key, name, role, last_seen, first_seen} is the inactive_nodes row when retention retired the node (no advert in retention.nodeDays; last_seen is the last advert), observer {id, name, last_seen} is the observers row when the key uploads as an observer. Both are omitted for an unknown key and for a blacklisted or hidden identity.",
        "parameters": [
          {
            "description": "Opt-in extras, comma-separated (the parameter may also repeat). advertRoutes (#2073): adds recentAdvertsByRoute, advertCounts, advertIntervals (#245) and route_class on the recentAdverts ADVERT rows. That costs a scan of all the node's ADVERT rows (cached per node for up to 30 s), so only the node page asks for it; without it the response has neither field and no route_class. Unknown values are ignored. Hidden identities never get the extras.",
            "in": "query",
            "name": "include",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "pubkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NodeDetailResponse"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get node detail",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/nodes/{pubkey}/analytics": {
      "get": {
        "description": "Per-node packet counts, timing, and RF stats. timeRange is the requested range; coverage describes the effective UTC retained-history interval, partial/loading status and reason (late_evicted_observations counts observations of evicted transmissions heard more than 1 h after their first_seen, which never move coverage.from). Rates and packet arrays use that interval; zero supported duration yields zero rates. This is not radio uptime.",
        "parameters": [
          {
            "in": "path",
            "name": "pubkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get node analytics",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/nodes/{pubkey}/analytics/summary": {
      "get": {
        "description": "Light sibling of /analytics: requested timeRange, effective UTC retained-history coverage, and computedStats. No node object, clockSkew, or heavy display arrays. Shares coverage, packet membership and computed statistics with the full endpoint for the same pubkey/days/instant. Partial/loading/unknown history is explicit; rates use coverage.seconds, not the requested days. Zero supported duration yields zero rates. This is available store data, not measured radio uptime.",
        "parameters": [
          {
            "description": "Time window in days, 1-365. Default 7.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "pubkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get node analytics summary",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/nodes/{pubkey}/antenna": {
      "get": {
        "description": "Returns {antennaM, antennaSource, assumed, estimatePending}: the antenna height a terrain profile uses for the node and its source, by the profile's precedence (operator-node, owner, dsm-estimate, operator-role, role-default). It never measures the surface: estimatePending is true while no surface estimate is cached, and a profile may then still raise a default to one. Hidden, unknown and unpositioned nodes all answer the same 404; 503 while the terrain profile is off.",
        "parameters": [
          {
            "in": "path",
            "name": "pubkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "A node's current antenna height",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/nodes/{pubkey}/antenna-claims": {
      "post": {
        "description": "One JSON object without other fields, at most 1 KiB, carrying a height part, a station-details part (#898) or both. Height part: heightM (0-100 m in 0.1 m steps) or clear:true (clear always means: remove the height). Details part: details {antennaType: omni|yagi|panel|other, gainDbi: -5 to 20 dBi in 0.1 dBi steps, power: 1-3 of mains|solar|battery, installation: roof|mast|indoor|portable, contactPublic, contactAdmin}, at least one field, or clearDetails:true. Both contacts are optional, 1-32 letters, digits, single spaces or . _ - @ # + / with no leading or trailing space, and are refused, never rewritten; contactPublic is shown to everyone on GET /api/nodes/{pubkey}/station once approved; contactAdmin is admin only and never in a public response. A details part replaces all six fields of the node's previous details. Open only when antennaClaims.enabled is set and a strong apiKey is configured (403 otherwise); setting details also needs antennaClaims.detailsEnabled (403), clearing them does not. Returns 202 {requestId, code, expiresAt, nameBudgetBytes, suggestedName}: put the 6-character code into the node's advert name as a whole space-separated word within the first nameBudgetBytes (23) bytes, appended after the name, and send an advert. A new advert with a valid signature from that public key proves the claim; the code is single-use and expires after 24 h. A proven claim that only clears takes effect at once; any other proven claim is approved by an administrator, or automatically with antennaClaims.autoApproveProven unless it sets details or is flagged for review (a gain outside 0-15 dBi is flagged too). One approval decides the whole claim, and replaces only the parts it carries. Hidden, unknown and unpositioned nodes all answer the same 404. A bad body costs no budget.",
        "parameters": [
          {
            "in": "path",
            "name": "pubkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "403": {
            "description": "Owner claims are disabled, or the body sets details while antennaClaims.detailsEnabled is off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Global budget of antennaClaims.submissionsPerHour (default 20) exceeded; Retry-After gives the seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "The claim queue is full (antennaClaims.maxQueuedRequests); Retry-After is set. The budget is refunded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "summary": "Claim a node's antenna height",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/nodes/{pubkey}/battery": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "pubkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/nodes/{pubkey}/battery"
      }
    },
    "/api/nodes/{pubkey}/card.png": {
      "get": {
        "description": "The link-preview card of a repeater, room or sensor (#811): name and role, the configured area the node is in when it is in one, when it was last heard, for repeaters and rooms the relays in the last 24 h and 1 h and the seen airtime (a lower bound), the neighbour count, an as-of time and the site name. No position, map or packet content. An absent value drops its clause. The key is exactly 64 hex characters (no short prefixes). Hidden nodes (node or observer blacklist, hidden name prefixes), unknown and inactive nodes and companions are the same 404. The only query key is v, a cache-bust of at most 64 bytes that is accepted and ignored. Values come from the in-memory node, relay and neighbour snapshots, never from a per-request scan. Cards are cached (64 entries, 10 min) by the values they show; a cached card is not charged. A card not in the cache is charged to the per-client budget map.dhm.profile.rateLimitPerMin and drawn in the render slots of the terrain share card. Cache-Control public, max-age=600. X-CoreScope-Card says hit, miss or refused. The card's theme and names setting are map.dhm.profile.card's. 404 unless share.nodes.enabled. (#811)",
        "parameters": [
          {
            "description": "preview cache-bust, at most 64 bytes; ignored",
            "in": "query",
            "name": "v",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "pubkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "A key that is not exactly 64 hex characters, or a query key other than one v.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Node sharing disabled, or a node that is unknown, hidden, inactive or a companion.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Per-client budget of cards not in the cache exceeded (map.dhm.profile.rateLimitPerMin, shared with the terrain share card). Retry-After gives the seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "The server is drawing as many cards as it draws at once; nothing was done and the per-client charge is given back. Retry-After gives the seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "summary": "Share card of a node (1200x630 PNG, the og:image of /p?node=)",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/nodes/{pubkey}/clock-skew": {
      "get": {
        "description": "Per-node clock-skew analysis derived from ADVERT advert-timestamps vs observation times, calibrated per observer (see ClockSkewEngine). samples is the full per-advert time series in chronological order (sparkline data) by default. Fase 5.2b's sample_limit trims that array before it's sent to the client — it only reduces JSON serialization/payload/client-decoding cost, not the server-side computation or allocation that already produced the full samples slice.",
        "parameters": [
          {
            "description": "Trims samples to at most the N most-recent entries, chronological order preserved. Omitted, non-numeric, or negative: unchanged, every sample returned (legacy default). 0: samples is omitted from the response entirely. N at or above the current sample count: unchanged, every sample returned. sampleCount and every other field are unaffected regardless of sample_limit.",
            "in": "query",
            "name": "sample_limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "pubkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get node clock skew",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/nodes/{pubkey}/declared-regions": {
      "get": {
        "description": "Issue #126. The regions this repeater told mobile collectors it lets flood, one report per answer, newest reported_at first, at most 100 (truncated=true when older reports exist). Each report: collector (an opaque number valid only within this response; collector keys and positions are never served), regions ([] = the repeater answered and floods nothing, with empty=true), truncated (the app's hint), reported_at (collector clock), ingested_at (ingest clock), repeater_clock (the repeater's RTC seconds as reported, or null), has_position. Reports are the collectors' claims, not authoritative. 404 unless clientRegions.enabled; 400 for a key that is not 64 hex; 404 for a blacklisted or hidden node. See docs/client-regions.md.",
        "parameters": [
          {
            "in": "path",
            "name": "pubkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Declared-region reports for a node",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/nodes/{pubkey}/health": {
      "get": {
        "description": "Health of one node: stats, recent packets, the rolling 24 h activity and its Heard By lists. directObservers received the node's own transmission; relayObservers saw only other evidence (see HeardDirectObserver). Both lists describe observed routing evidence, not radio range.",
        "parameters": [
          {
            "in": "path",
            "name": "pubkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NodeHealthResponse"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get node health",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/nodes/{pubkey}/hop_analytics": {
      "get": {
        "description": "Issue #1812. For each recent transmission that passed through this node as a relay, its hop-count AT THIS NODE — the node's own 0-based index within the packet's resolved relay path, i.e. the number MeshCore firmware compares against flood_max/flood_max_advert/flood_max_unscoped in allowPacketForward. Deliberately not the same number as /analytics' hopDistribution field, which is path length to whichever observer reported the packet (a different, unrelated distance). Only transmissions with a resolved relay path are included.",
        "parameters": [
          {
            "description": "Time window in days, 1-365.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "pubkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NodeHopAnalyticsResponse"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get node hop-count analytics",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/nodes/{pubkey}/neighbors": {
      "get": {
        "description": "Returns the queried node's first-hop neighbors with affinity scores and observation metadata (count, SNR, distance, observers). Ambiguous edges carry candidate pubkeys.",
        "parameters": [
          {
            "in": "path",
            "name": "pubkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NodeNeighborsResponse"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get node neighbors",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/nodes/{pubkey}/paths": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "pubkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get node routing paths",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/nodes/{pubkey}/reach": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "pubkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/nodes/{pubkey}/reach"
      }
    },
    "/api/nodes/{pubkey}/rx-coverage": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "pubkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/nodes/{pubkey}/rx-coverage"
      }
    },
    "/api/nodes/{pubkey}/station": {
      "get": {
        "description": "Returns {details, approvedAt, stale}: the station details of the node's approved claim (#898): antennaType, gainDbi, power (canonical order mains, solar, battery), installation and the owner's optional contactPublic, each absent when not given. details is null when there are none, they were removed, station details are off (antennaClaims.detailsEnabled), or the node moved more than antennaClaims.staleMoveM metres from where they were proven (then stale is true). The administrator contact is never returned. Served from a snapshot refreshed every 30 s; it does not need the terrain profile. Hidden, unknown and unpositioned nodes all answer the same 404.",
        "parameters": [
          {
            "in": "path",
            "name": "pubkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "A node's owner-confirmed station details",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/observers": {
      "get": {
        "description": "Returns all known packet observers/gateways.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "List observers",
        "tags": [
          "observers"
        ]
      }
    },
    "/api/observers/clock-skew": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/observers/clock-skew"
      }
    },
    "/api/observers/metrics/summary": {
      "get": {
        "description": "Aggregate metrics across all observers within window (noise floor, battery, sparkline). Each row also carries tx_airtime_pct_1h / rx_airtime_pct_1h: the airtime share over the last hour regardless of window, null with under 30 minutes of samples since the last reboot or no sample in the last 15 minutes. duty_cycle_warn_pct is the configured warning threshold (dutyCycleWarnPct, default 10).",
        "parameters": [
          {
            "description": "Lookback such as 1h, 24h, 7d (default 24h)",
            "in": "query",
            "name": "window",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "IATA code to filter observers",
            "in": "query",
            "name": "region",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Observer metrics summary",
        "tags": [
          "observers"
        ]
      }
    },
    "/api/observers/neighbors": {
      "get": {
        "description": "Flattens /api/observers/{id}/neighbors across ALL observers into one list -- Tools \u003e Observer Neighbors. Same per-entry semantics (scopes null unless the OTA scope query responded, seenViaPackets cross-references the packet-derived neighbor_edges graph, observer/neighbor name null when unresolved). Blacklisted observers (config.json observerBlacklist) are excluded. Empty list (not an error) when no observer has ever sent a /neighbors report. unknownScopes surfaces region-scope names that turned up in a reported neighbor scope list but aren't part of this deployment's configured hashRegions -- scopes the mesh is using that CoreScope doesn't know about yet.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllObserverNeighborsResponse"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Every observer's reported direct neighbors, network-wide",
        "tags": [
          "observers"
        ]
      }
    },
    "/api/observers/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get observer detail",
        "tags": [
          "observers"
        ]
      }
    },
    "/api/observers/{id}/analytics": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get observer analytics",
        "tags": [
          "observers"
        ]
      }
    },
    "/api/observers/{id}/metrics": {
      "get": {
        "description": "Packet rates, uptime, and performance metrics.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get observer metrics",
        "tags": [
          "observers"
        ]
      }
    },
    "/api/observers/{id}/neighbors": {
      "get": {
        "description": "Ground truth from the observer's own /neighbors firmware report (#1865) -- distinct from the packet-path-inferred neighbor graph. Empty `neighbors` (never null) and an empty `reportedAt` mean the observer has never sent a /neighbors report: opt-in firmware, unavailable on non-PSRAM hardware -- absence is normal, not a fault. Each entry's `scopes` is null unless the neighbor's OTA scope query responded (status=\"responded\"); `name`/`role` are null when the pubkey doesn't resolve to a known node. `seenViaPackets` cross-references the packet-path-inferred neighbor_edges graph: false means this firmware-confirmed neighbor has never had a resolved packet path between it and the observer, a diagnostic signal (possible coverage gap or packet loss), not itself a fault.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get an observer's direct (zero-hop) neighbors",
        "tags": [
          "observers"
        ]
      }
    },
    "/api/observers/{id}/neighbors/{pubkey}/metrics": {
      "get": {
        "description": "Raw (unaggregated) history of the snr/heard_secs_ago fields the observer's own /neighbors report carries per neighbor -- report volume per pair is inherently low so, unlike /api/observers/{id}/metrics, there is no resolution/downsampling. Defaults to the last 30 days.",
        "parameters": [
          {
            "description": "RFC3339 lower bound (default: 30 days ago)",
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "RFC3339 upper bound (default: none)",
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "pubkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get SNR history for one observer\u003c-\u003eneighbor direct-RF link",
        "tags": [
          "observers"
        ]
      }
    },
    "/api/packets": {
      "get": {
        "description": "Returns decoded packets with filtering, sorting, and pagination.",
        "parameters": [
          {
            "description": "Max packets to return",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Pagination offset",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Sort field",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Sort order (asc/desc)",
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by packet type",
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Comma-separated numeric payload types 0-15 excluded before pagination and total counting (raw and grouped). At most 16 entries and 64 characters; duplicates collapse. Empty means no exclusions; NULL payload types remain. Intersects with type; exclusion wins on overlap. Invalid/repeated parameters or combination with nodes return 400; single node is supported.",
            "in": "query",
            "name": "excludeTypes",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by observer ID",
            "in": "query",
            "name": "observer",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Time range filter (e.g. 1h, 24h, 7d)",
            "in": "query",
            "name": "timeRange",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Full-text search",
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Group duplicate packets by hash",
            "in": "query",
            "name": "groupByHash",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Comma-separated public keys or node names (multi-node filter; exact, case-sensitive match). Entries are trimmed, empty entries are dropped and duplicates collapse. At most 50 distinct entries, 100 comma-separated entries and 4096 characters (#335); over any bound is 400 before any lookup. An all-empty list returns no packets.",
            "in": "query",
            "name": "nodes",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid filter: malformed or repeated excludeTypes, excludeTypes combined with nodes, or a nodes list over its bounds (50 distinct entries, 100 comma-separated entries, 4096 characters; #335).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "summary": "List packets",
        "tags": [
          "packets"
        ]
      }
    },
    "/api/packets/observations": {
      "post": {
        "description": "Returns the stored observations for up to 200 content hashes in one call: {\"hashes\": [...]} in, {\"results\": {\"\u003chash\u003e\": [...]}} out. More than 200 hashes is 400. The request body is capped at 65536 bytes before it is parsed (#334) — a larger body is 413 regardless of its shape or of whether it declares a Content-Length, and the byte cap leaves roughly 17x headroom over a full 200-hash request, so the 200-hash limit is what a client actually meets first.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "413": {
            "description": "Request body over 65536 bytes (#334). Enforced before parsing, on bytes received, so it also applies to a chunked request with no Content-Length.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "summary": "Get observations for several packets",
        "tags": [
          "packets"
        ]
      }
    },
    "/api/packets/timestamps": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get packet timestamp ranges",
        "tags": [
          "packets"
        ]
      }
    },
    "/api/packets/{hash}/card.png": {
      "get": {
        "description": "The link-preview card of one packet (#812): its firmware payload type, route type and deepest hop count, the observer that heard it first and how many observers heard it, the path as a schematic with no basemap (hop points and lines, observers, faint outlines of the touched areas), the spread, the farthest observer from the first, the estimated flood airtime (a lower bound), the first-heard time in UTC and the site name. Every payload type gets a card; nothing of the payload is shown (no message text, channel or sender), and only an advert names its origin. The path follows the ping-score path's visibility rule: a branch through a hidden node or observer is removed whole, a hidden first observation is dropped (the card then shows counts only), approximate positions are left out under an active visibility policy, and every count is computed from what is drawn. The hash is exactly 16 hex characters (no numeric ids). Unknown packets, packets no longer in the store or the database, and adverts from a hidden node are the same 404. The only query key is v, a cache-bust of at most 64 bytes that is accepted and ignored. Cards are cached (64 entries) by the values they show: 2 min while the packet was first heard less than 10 min ago, 24 h after that, with Cache-Control public, max-age to match; a cached card is not charged. A card not in the cache is charged to the per-client budget map.dhm.profile.rateLimitPerMin and drawn in the render slots shared with the other share cards. X-CoreScope-Card says hit, miss or refused. The card's theme and names setting are map.dhm.profile.card's. 404 unless share.packets.enabled. (#812)",
        "parameters": [
          {
            "description": "preview cache-bust, at most 64 bytes; ignored",
            "in": "query",
            "name": "v",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "hash",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "A hash that is not exactly 16 hex characters, or a query key other than one v.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Packet sharing disabled, an unknown packet, a packet no longer stored, or an advert from a hidden node.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Per-client budget of cards not in the cache exceeded (map.dhm.profile.rateLimitPerMin, shared with the other share cards). Retry-After gives the seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "The server is drawing as many cards as it draws at once; nothing was done and the per-client charge is given back. Retry-After gives the seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "summary": "Share card of a packet (1200x630 PNG, the og:image of /p?packet=)",
        "tags": [
          "packets"
        ]
      }
    },
    "/api/packets/{hash}/path": {
      "get": {
        "description": "Resolves EVERY distinct station that observed a packet to its own branch: hop count (from that station's deepest observation) plus, where resolvable, each relay's name/role/lat/lon in path order and the station's own position (self-advertised GPS when known, same as /api/observers, else its configured IATA code). A station heard more than once (later flood copies via longer routes) contributes only its deepest observation. Lat/lon are null for any hop or observer that has no known position -- callers should draw a gap, not guess. Also returns `first`: the single earliest-arriving observation across every station (usually 0 hops, close to the sender) -- an approximate origin landmark, distinct from branches[0] which is the deepest/farthest-traveled branch. Backs the Channels tab's ping-bot \"View path\" map link.",
        "parameters": [
          {
            "in": "path",
            "name": "hash",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PacketPathResponse"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get a packet's full geographic flood spread",
        "tags": [
          "packets"
        ]
      }
    },
    "/api/packets/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get packet detail",
        "tags": [
          "packets"
        ]
      }
    },
    "/api/paths/inspect": {
      "post": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/paths/inspect"
      }
    },
    "/api/perf": {
      "get": {
        "description": "Returns per-endpoint request timing and slow query log. mem=1 adds the store memory breakdown, a full store walk: one scan at a time per server plus a 5 s cooldown after it, otherwise 429 with Retry-After.",
        "parameters": [
          {
            "description": "1 = include memoryBreakdown (rate-limited, see description)",
            "in": "query",
            "name": "mem",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Performance statistics",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/perf/io": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/perf/io"
      }
    },
    "/api/perf/reset": {
      "post": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Reset performance stats",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/perf/sqlite": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/perf/sqlite"
      }
    },
    "/api/perf/write-sources": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/perf/write-sources"
      }
    },
    "/api/perf/ws-clients": {
      "get": {
        "description": "Returns open WebSocket connection counts, oldest first. range accepts 24h (default), 7d or 30d; other values return 400. Samples are one minute for 24h, five minutes for 7d and fifteen minutes for 30d, with the last clients count and maximum peak in each bucket. gapBefore marks interrupted sampling; missing periods are not zero-filled. persistence.enabled and persistence.healthy indicate whether the separate history journal is saving successfully. At most 30 days are retained; history survives server/container replacement when its data directory is retained and writable. No packet database writes.",
        "parameters": [
          {
            "description": "24h (default), 7d or 30d",
            "in": "query",
            "name": "range",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "WebSocket client history",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/ping-scores": {
      "get": {
        "description": "Global (not scoped by region/area) records and leaderboards derived from every ping-bot-triggering channel message ever seen: farthest reach, most hops, widest simultaneous spread, fastest full spread, and most airtime-efficient ping, plus which relay nodes and which observers appear most often. Computed from the same getPacketPath + LoRa-airtime-estimate logic behind /api/packets/{hash}/path and refreshed on a background interval, so it may lag the very latest ping by a few minutes. Fields are omitted (not zero) until at least one qualifying ping has been recorded.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PingScoresResponse"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Ping-score highscore board",
        "tags": [
          "packets"
        ]
      }
    },
    "/api/ping-scores/{hash}/path": {
      "get": {
        "description": "Returns coherent live or archived path evidence for the current record slot. Archived capture time describes saved geometry, not necessarily the transmission time. Old expired observations cannot be reconstructed. Superseded slot/hash pairs return 404; invalid slots return 400. Current identity privacy rules apply to both sources; unavailable and initializing responses omit path.",
        "parameters": [
          {
            "description": "allTime.\u003ckind\u003e or thisWeek.\u003ckind\u003e; kind is farthestPing, mostHopsPing, widestSpreadPing, fastestSpreadPing or mostEfficientPing",
            "in": "query",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "hash",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PingScorePathResponse"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get a displayed ping record's saved path",
        "tags": [
          "packets"
        ]
      }
    },
    "/api/reach-rank": {
      "get": {
        "description": "Nodes ranked by all-time neighbour count: distinct neighbours over valid neighbor_edges rows (both endpoints 64-hex pubkeys, not equal; within the ingestor's edge retention) — a historical count, not a measure of radio quality, range or traffic. Only nodes with a Reach page (node row, or named observer row) that are not blacklisted or hidden are ranked. Rank is competition ranking (1, 1, 3) with ties listed in pubkey order; a search or page never renumbers. Served from a shared snapshot (60s TTL, refreshed in the background) that also backs the Rank on /api/nodes/{pubkey}/reach; snapshot_at is when it was read.",
        "parameters": [
          {
            "description": "Case-insensitive substring of node name or pubkey (max 64 characters)",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Rows to skip within the (filtered) list; non-negative (default 0)",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Rows per page (default 50; above 100 → 100; zero, negative or non-numeric → 50)",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Reach leaderboard",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/regions/observed": {
      "get": {
        "description": "Bulk Regions map snapshot with selectable 1h, 24h or 7d window. Includes unpositioned scoped relays, current identity visibility filters, conservative retained-history coverage and explicit node/scope truncation flags. Reported positions are self-reported coordinates; neighbor estimates are excluded. Window bounds end at generatedAt, the shared relay snapshot time (normally refreshed every five minutes).",
        "parameters": [
          {
            "description": "1h, 24h (default), or 7d",
            "in": "query",
            "name": "window",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegionsObservedResponse"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid window.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Current identity or node metadata could not be read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Relay snapshot is unavailable or warming up.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "summary": "Observed scoped relay positions",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/resolve-hops": {
      "get": {
        "description": "Resolves hash prefixes in a hop path to node names. Returns affinity scores and best candidates.",
        "parameters": [
          {
            "description": "Comma-separated hop hash prefixes",
            "in": "query",
            "name": "hops",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Resolve hop path",
        "tags": [
          "nodes"
        ]
      }
    },
    "/api/rx-coverage": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/rx-coverage"
      }
    },
    "/api/rx-leaderboard": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/rx-leaderboard"
      }
    },
    "/api/scope-audit": {
      "get": {
        "description": "Observer-confirmed scope declarations compared with collision-safe flood path evidence. Missing observations are not proof of a configuration error. Unknown scopes, ambiguous hops, absent observations, and declarations older than seven days make evidence incomplete. Observer scope lists may be truncated without a completeness flag. Cached 30 seconds for each of three supported windows; identity visibility is applied live.",
        "parameters": [
          {
            "description": "Observation window: 1h, 24h (default), or 7d",
            "in": "query",
            "name": "window",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Declared versus observed forwarding scopes",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/scope-audit/transport": {
      "get": {
        "description": "#414: every repeater or room seen forwarding flood traffic (TRANSPORT_FLOOD/FLOOD observations) in the window, including repeaters never asked for a declaration (declaration null, not the same as an empty declaration). With scope, each row reports carrier (distinct transmissions seen carrying it) and nonCarrier (forwarded without it) and an evidence label: carrier, not-seen-carrying, ambiguous (a hop prefix shared with another repeater carried the scope), incomplete (unknown scopes or frames without headers), low-evidence (fewer than minForwarded transmissions) or no-scope-traffic (nobody in the population was seen carrying it). Evidence is observation only, never a configuration verdict: quiet traffic and observer coverage explain absence. Uses the same collision-safe attribution and per-transmission deduplication as /api/scope-audit; repeaters seen only through ambiguous prefixes are not listed. region restricts the whole population (counts, rows and details) to observations heard by observers in those IATA regions. One read-only scan per window and region is cached 30 seconds (bounded, singleflight) and serves every scope; identity visibility is applied live. coverage.complete is false when the oldest stored observation is newer than the window start.",
        "parameters": [
          {
            "description": "Observation window: 1h, 24h (default), or 7d",
            "in": "query",
            "name": "window",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Region scope name, exact case, optional leading #; omitted lists forwarders without carrier evidence",
            "in": "query",
            "name": "scope",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Comma-separated observer IATA codes (at most 32); All or empty means every observer; codes without observers match nothing",
            "in": "query",
            "name": "region",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Observed scope transport by repeater",
        "tags": [
          "analytics"
        ]
      }
    },
    "/api/scope-stats": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "/api/scope-stats"
      }
    },
    "/api/skraafoto/preview/{collection}/{item}": {
      "get": {
        "description": "One photo of GET /api/skraafoto/search as an image/jpeg of at most 1024 px on the long edge. The server reads only the tiles of one overview of the photo's Cloud-Optimized GeoTIFF on the Skråfoto CDN, by HTTP range requests, and re-encodes them; the CDN is never sent the token. collection is skraafotos\u003cyear\u003e (2019 or later) and item a photo id of that year; the only query string is a zoom's. A photo no search has cached is looked up in the STAC API first. Previews are cached 7 days (map.skraafoto.cacheMB, default 64), served with Cache-Control: public, max-age=604800, and X-CoreScope-Cache says hit or miss. With zoom=1, x and y (#737 M3b) the image is a crop of at most 1024 px on the long edge around point (x, y) of the preview (the pixels of the search's point and path), cut 1:1 from a finer overview: the smallest at least four times the preview's (IFD2 of a real photo, about 0.3 m/px against the preview's 1.1). Only the tiles under the crop are read, at most 9, within the preview's byte budget. Near the photo's border the crop is moved inside it, so the point is off centre. X-CoreScope-Skraafoto-Marker is the point in the crop's pixels (x,y) and X-CoreScope-Skraafoto-Crop the crop in the preview's pixels (x0,y0,x1,y1), both to two decimals. Crops are cached with the previews, by the photo, the overview and the crop's box, whose origin is snapped to half a tile, so nearby points share one; they count against the same budgets. Credit: Klimadatastyrelsen, Skråfotos, CC BY 4.0. 404 unless map.skraafoto.enabled and map.dhm has a token. (#737 M1, M3b)",
        "parameters": [
          {
            "description": "1: a zoomed crop around (x, y) instead of the preview (#737 M3b); only with x and y",
            "in": "query",
            "name": "zoom",
            "required": false,
            "schema": {
              "enum": [
                "1"
              ],
              "type": "string"
            }
          },
          {
            "description": "the point's x in the preview's pixels, a plain decimal 0–1024 inside the preview; only with zoom",
            "in": "query",
            "name": "x",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "the point's y in the preview's pixels, a plain decimal 0–1024 inside the preview; only with zoom",
            "in": "query",
            "name": "y",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Malformed collection or photo id, a query string other than zoom=1\u0026x=\u0026y= with each once, or a zoom point outside the photo's preview (no upstream call once the photo's frame is cached).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "map.skraafoto is not enabled, or the photo does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Per-client budget of previews not in the cache exceeded (map.skraafoto.previewRateLimitPerMin, default 120/min). Retry-After gives the seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "The STAC API or the CDN failed, or the photo is not a COG the preview (or the crop) can read within its bounds; nothing is cached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "The daily budget (map.skraafoto.dailyCap) is spent or map.skraafoto.maxInFlight upstream calls are running, as for the search.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "504": {
            "description": "The STAC API or the CDN timed out.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "summary": "Reduced preview of one Skråfoto photo (JPEG)",
        "tags": [
          "config"
        ]
      }
    },
    "/api/skraafoto/search": {
      "get": {
        "description": "The Skråfoto oblique aerial photos (Klimadatastyrelsen) of one point: at most one photo per direction, in the order north, east, south, west, nadir; a direction without a photo is absent. Response: {collection, year, years[], photos: [{id, collection, direction, datetime, viewerUrl, previewUrl?, frame?: {width, height}, point?: {x, y}, inFrame, path?: [{x, y}], beam?: {x, y}, approx}], credit: {attribution, owner, datasetName, datasetUrl, licenseName, licenseUrl}}. Of up to 5 candidates per direction the photo shown is the one whose image centre is nearest the point (#737 M3a). point is the point on the ground, projected with the photo's camera model into its preview (frame: the preview's size in pixels, x right and y down from the top-left corner); it may lie outside the frame, which inFrame says; frame and point are absent when the photo has no usable camera model. The ground height is the DHM terrain model at the point, fetched like a terrain profile's (map.dhm.profile limits); without it each photo's footprint height is used and approx is true. With path, path is the line of sight between the two antennas, 32 points where it is in the frame, and beam the line's point above the point (nearest it, at the line's height there), for a point within 25 m of the line: point is on the ground, the line at antenna height, so in an oblique photo they are apart (#839). The answers are cached by the point, the path and the antenna heights. years are the years offered, newest first (2017 is not); without year the newest is searched. viewerUrl opens the photo at full resolution in the official viewer; previewUrl is GET /api/skraafoto/preview. No upstream URL and no token is ever returned. The server asks the Dataforsyningen STAC API with the operator's map.dhm token, one fixed query per direction, for the point snapped to a 10 m EPSG:25832 grid; answers are cached 24 h and X-CoreScope-Cache says hit (no upstream, neither STAC nor DHM, was asked), miss or none (outside Denmark: answered empty with no upstream call). Credit: Klimadatastyrelsen, Skråfotos, CC BY 4.0. 404 unless map.skraafoto.enabled and map.dhm has a token. (#737 M1)",
        "parameters": [
          {
            "description": "latitude in decimal degrees, plain decimal",
            "in": "query",
            "name": "lat",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "longitude in decimal degrees, plain decimal",
            "in": "query",
            "name": "lon",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "the collection's year, one of years; 2019 or later",
            "in": "query",
            "name": "year",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "a line of sight to project: latA,lonA,latB,lonB, plain decimals, at least 1 m and at most map.dhm.profile.maxPathKm (default 80 km) long (#737 M3a)",
            "in": "query",
            "name": "path",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "antenna height above the ground at A in metres, 0–100; only with path; default the profile's point height",
            "in": "query",
            "name": "ha",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "antenna height above the ground at B in metres, 0–100; only with path; default the profile's point height",
            "in": "query",
            "name": "hb",
            "required": false,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Missing, repeated, malformed or unknown parameter, ha or hb without path, a path out of bounds, or a year the API does not have (no upstream call once the year list is cached).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "map.skraafoto is not enabled, or map.dhm has no token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Per-client budget of searches not in the cache exceeded (map.skraafoto.searchRateLimitPerMin, default 30/min). Retry-After gives the seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "The STAC API failed or answered something unexpected; no upstream detail is returned and nothing is cached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "The server-wide budget of uncached searches and previews per UTC day is spent (map.skraafoto.dailyCap, default 2000; Retry-After: until 00:00 UTC), or map.skraafoto.maxInFlight upstream calls (default 8) are already running (Retry-After: 5). No upstream call, not charged to the per-client budget.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "504": {
            "description": "The STAC API timed out.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "summary": "Oblique aerial photos of a map point (Skråfoto, Denmark)",
        "tags": [
          "config"
        ]
      }
    },
    "/api/stats": {
      "get": {
        "description": "Returns aggregate stats (node counts, packet counts, observer counts). Cached for 10s.",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Network statistics",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/terrain/coverage": {
      "get": {
        "description": "The area within a radius where a receiver is predicted to hear a transmitter at the centre: free-space loss plus ITU-R P.526 Bullington diffraction over the terrain with the earth bulge, along one radial per 100 m raster pixel at the edge, sampled every map.coverage.resolutionM (default 30 m), with a receiver every 100 m. Terrain is the DHM terrain model (DTM) where DHM covers, and with map.dhm.profile.foreignFill.enabled Copernicus DEM GLO-30 elsewhere (a surface model); sources and attribution say which were used. The answer describes a raster of path loss in dB (raster.encoding loss-u8: one byte per pixel, row 0 north, value v is raster.lossBaseDb + v * raster.lossStepDb dB, raster.noData outside the radius or where the terrain has a gap) on Web Mercator bounds, fetched from raster.url. Power, antenna gains, cable loss and sensitivity are not parameters: the margin is power + gains - loss - cable loss - sensitivity - environment loss, which the browser computes from the loss with the operator's defaults (/api/config/client coverage.radio, and coverage.environmentLossDb for the buildings, trees and other clutter the terrain does not include: map.coverage.environmentLossDb, default 25 dB, #962) or the viewer's own. The model is model=bullington (P.526 section 4.5.1) or model=delta (the complete method of section 4.5.2, delta-Bullington), default map.coverage.model (delta); params.model names it with its version. Results are cached per centre (snapped to 4 decimals), radius, antenna heights (0.5 m steps), frequency, k, model, resolution and sources (map.coverage.cacheEntries, default 32, 24 h); X-CoreScope-Cache says hit or miss. The transmitter height follows the terrain profile's rules (request, config radio.antennaHeightsM, owner height, cached surface estimate, role default; a map point 2 m); the receiver is 2 m unless hr is given. reach lists the nodes in reach (#941 M2): every repeater and room with a valid position inside the radius (not the centre node), evaluated point to point with the same model over the same elevation grid (no extra upstream call) and its own antenna height (config radio.antennaHeightsM, approved owner height, role default), lowest loss first, at most 1000 (omitted counts the rest), as {roles, budgetDb, counts: {good, marginal, weak, none}, nodes: [{pubkey, name, role, distanceKm, heightM, heightSource, lossDb}], omitted, noTerrain}. counts are at the operator's link budget budgetDb (config radio, without the environment loss); the margin of a node is the budget minus lossDb. A hidden identity (blacklists, hidden name prefixes, observer aliases) is never named and is in no count (counts, omitted, noTerrain): the response is the one it would be without that node, decided on every response, cached or not. reach is null when the node snapshot was not ready (that result is kept 5 minutes) or when node visibility could not be checked. 404 unless map.coverage.enabled with DHM active or the foreign fill on. (#941)",
        "parameters": [
          {
            "description": "the transmitter: a node's 64-hex public key or lat,lon in decimal degrees",
            "in": "query",
            "name": "at",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "transmitter antenna height above ground, 0-100 m (default by the terrain profile's rules)",
            "in": "query",
            "name": "ha",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "receiver antenna height above ground, 0-100 m (default 2 m)",
            "in": "query",
            "name": "hr",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "radius in km, from 1 to map.coverage.maxRadiusKm (default 40, or the maximum if lower)",
            "in": "query",
            "name": "r",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "frequency in MHz, 150-2500 (default as the terrain profile: config, observers, firmware)",
            "in": "query",
            "name": "freq",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "propagation model: bullington or delta (default map.coverage.model, delta)",
            "in": "query",
            "name": "model",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid or unknown parameter; a radius over map.coverage.maxRadiusKm ({\"error\":\"radius too large\",\"maxRadiusKm\":\u003climit\u003e}); or a centre no terrain source covers ({\"error\":\"point not covered\"}). No upstream call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Predicted reach disabled, or a public key that is unknown, hidden or has no position.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Per-client budget of computations not in the cache exceeded (map.coverage.rateLimitPerMin, default 2/min; hits are not counted). Retry-After gives the seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "The elevation service failed; no upstream detail is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "map.coverage.maxInFlight computations (default 1) are already running server-wide, or the server-wide budget of DHM rasters (map.coverage.upstreamPerMin, default 240/min) cannot pay a cold computation; no upstream call, not charged to the per-client budget. Requests for a computation already running share it. Retry-After gives the seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "504": {
            "description": "The elevation service timed out (10 s per raster, 30 s for the whole computation). Tiles that arrived are cached, so a retry is faster.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "summary": "Predicted reach of a radio at a node or a map point (terrain-aware coverage)",
        "tags": [
          "config"
        ]
      }
    },
    "/api/terrain/coverage/raster": {
      "get": {
        "description": "The raster GET /api/terrain/coverage described: width x height bytes, application/octet-stream, gzip Content-Encoding when the client accepts it. Served from the result cache only: a key that is not cached (or expired) is 404, and never causes a computation. (#941)",
        "parameters": [
          {
            "description": "the 32-hex key of a coverage response",
            "in": "query",
            "name": "key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Missing, malformed or extra parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not cached, or predicted reach disabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "summary": "Loss raster of a predicted reach",
        "tags": [
          "config"
        ]
      }
    },
    "/api/terrain/heritage": {
      "get": {
        "description": "What the Slots- og Kulturstyrelsen register of protected ancient monuments (Fund og Fortidsminder) says about one point: the protection zone (layer fundogfortidsminder_areal_beskyttelse) holding it, or else the nearest one whose edge lies within map.heritage.radiusM (default 100 m). nearest carries the dataset's own anlaegstype (type), datering (dating), fred_status (status), frednr (protectionNumber) and systemnr (systemNumber), the distance to the zone's edge in whole metres (0 inside) and insideZone; it is null when no zone qualifies. count is the zones holding the point or within the radius; truncated means the area held more zones than one upstream page. Nothing from the request is echoed. The server asks the agency's public WFS for one fixed 250 m EPSG:25832 cell grown by the radius and computes the answer locally; cells are cached (default 168 h) and X-CoreScope-Cache says hit, miss or none (outside the layers' extent: answered empty with no upstream call). Credit: (c) Slots- og Kulturstyrelsen. 404 unless map.heritage.enabled. (#723 M2)",
        "parameters": [
          {
            "description": "latitude in decimal degrees, plain decimal",
            "in": "query",
            "name": "lat",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "longitude in decimal degrees, plain decimal",
            "in": "query",
            "name": "lon",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Missing, repeated, malformed or unknown parameter (no upstream call).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "map.heritage is not enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Per-client budget of lookups not in the cache exceeded (map.heritage.rateLimitPerMin, default 20/min). Retry-After gives the seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "The register's service failed or answered something unexpected; no upstream detail is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "map.heritage.maxInFlight upstream lookups (default 4) are already running, server-wide; no upstream call, not charged to the per-client budget. Retry-After: 5.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "504": {
            "description": "The register's service timed out (map.heritage.upstreamTimeoutMs).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "summary": "Protected ancient monument at a map point (Denmark)",
        "tags": [
          "config"
        ]
      }
    },
    "/api/terrain/profile": {
      "get": {
        "description": "Elevation between two nodes or map points from the Danmarks Hojdemodel WCS, sampled every 10-25 m (at most 3200 samples, at most 1024 returned; the worst points are always included, and data gaps stay visible: the edges of every gap while they fit, otherwise missing samples spread over all gaps, so neighbouring gaps can merge and no evenly spaced sample may be left), with the first Fresnel zone and earth curvature (k-factor). The terrain model (DTM) decides verdict.state: clear = the whole first Fresnel zone is clear; fresnel100 = obstructed, but at least 60 % of it is clear (the usual criterion holds); fresnel60 = line of sight clear, less than 60 %; blocked = the line of sight is obstructed; unknown = any sample lacks data. The surface model (DSM: trees, buildings) is assessed in verdict.surface for information only; a surface above the antenna at an endpoint makes verdict.surface.state blocked with verdict.surface.reason = antennaBelowSurface and verdict.surface.endpoint = A, B or both (both fields are absent otherwise; the antenna height is likely too low, e.g. a node on a roof); the worst point is then the worst interior obstruction of the line of sight if there is one, else that endpoint (the deeper one if both), with a null worstF1Fraction (the zone has no radius there); verdict.surface.state is also forced to unknown, with null clearance numbers, whenever coverage.state is not full, even though the DSM can be a separate, complete coverage from the DTM. Outside Denmark the profile is partial or none and the verdict unknown; a path entirely outside makes no upstream call. Antenna heights default by role (repeater 10 m, room 5 m, companion and sensor 2 m, map point 2 m) unless set in the request or in config radio.antennaHeightsM; assumed heights are flagged. The frequency is the request's, else config radio.defaultFreqMHz, else the most common observer radio frequency of the last 7 days, else the firmware default 869.618 MHz. Elevations are cached per path (24 h); antenna heights, k and frequency do not affect the cache, and X-CoreScope-Cache says hit, miss or none. With map.dhm.profile.buildings.enabled (off by default) a model=both answer also tells buildings from trees where the surface stands more than 2.5 m above the terrain, from INSPIRE building footprints (#730): classification.state is full (every such sample classified), partial (some are not, e.g. classification.truncated: a stretch had more buildings than one page) or unavailable (none: the footprint service failed, or coverage is not full); each such sample gets cls b (building) or v (trees or other) when classified; verdict.surface.cause says what stands where the surface verdict is decided (building, vegetation, or unknown when some of it is unclassified; absent for a clear or unknown surface, or where the terrain alone decides); and attribution then also credits the footprints. The verdicts themselves never change, the classification is fetched within the same request budget, and a failure leaves the answer 200, unclassified. 404 unless map.dhm is enabled with a token and map.dhm.profile.enabled. (#681)",
        "parameters": [
          {
            "description": "endpoint A: a node's 64-hex public key or lat,lon in decimal degrees",
            "in": "query",
            "name": "a",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "endpoint B, as a",
            "in": "query",
            "name": "b",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "both (default: DTM and DSM) or dtm (terrain only, half the upstream calls)",
            "in": "query",
            "name": "model",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "antenna height above ground at A, 0-100 m",
            "in": "query",
            "name": "ha",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "antenna height above ground at B, 0-100 m",
            "in": "query",
            "name": "hb",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "effective earth factor, 0.5-10 (default config radio.kFactor or 4/3)",
            "in": "query",
            "name": "k",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "frequency in MHz, 150-2500",
            "in": "query",
            "name": "freq",
            "required": false,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid or unknown parameter, identical endpoints, or path longer than map.dhm.profile.maxPathKm (default 80 km; no upstream call). A path that is too long answers {\"error\":\"path too long\",\"maxPathKm\":\u003climit\u003e}.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Profile disabled, or a public key that is unknown, hidden or has no position.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Per-client budget of profiles not in the cache exceeded (map.dhm.profile.rateLimitPerMin, default 10/min). Retry-After gives the seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "The elevation service failed; no upstream detail is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "map.dhm.profile.maxInFlight uncached profiles (default 4) are already being fetched, server-wide; no upstream call. Requests for a profile already being fetched share that fetch and take no slot; a refused request starts no fetch, so there is nothing to join. A refusal is not charged to the per-client budget. Retry-After gives the seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "504": {
            "description": "The elevation service timed out (per raster, or 25 s for the whole profile).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "summary": "Terrain profile with line of sight and Fresnel zone (DHM, Denmark)",
        "tags": [
          "config"
        ]
      }
    },
    "/api/terrain/profile.png": {
      "get": {
        "description": "The link-preview card of the same profile GET /api/terrain/profile computes: both endpoints (node names only for nodes that endpoint would serve; hidden, unknown and unpositioned nodes are the same 404), the chart, the verdict in the panel's words, the antenna heights and the DHM CC BY 4.0 credit. Same parameters, plus v, a cache-bust that is accepted and ignored. 404 unless map.dhm.profile.share.enabled. Cards are cached (map.dhm.profile.card.cacheEntries, default 64, bounded by bytes too, 24 h); a cached card is not charged. A card not in the cache is charged to the per-client budget (map.dhm.profile.rateLimitPerMin). When its elevations are not cached either, fetching them spends the server-wide share budget map.dhm.profile.share.upstreamPerMin (shareUpstreamPerMin, default 2/min, 0: never) and a maxInFlight slot, shared with GET /api/terrain/profile; a spent budget, an upstream failure or an upstream slower than 10 s gives a degraded card instead (200, no verdict, Cache-Control max-age=60). A complete card is Cache-Control public, max-age=86400, immutable. X-CoreScope-Card says hit, miss, degraded or refused. (#727)",
        "parameters": [
          {
            "description": "endpoint A: a node's 64-hex public key or lat,lon in decimal degrees",
            "in": "query",
            "name": "a",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "endpoint B, as a",
            "in": "query",
            "name": "b",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "both (default) or dtm",
            "in": "query",
            "name": "model",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "antenna height above ground at A, 0-100 m",
            "in": "query",
            "name": "ha",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "antenna height above ground at B, 0-100 m",
            "in": "query",
            "name": "hb",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "effective earth factor, 0.5-10",
            "in": "query",
            "name": "k",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "frequency in MHz, 150-2500",
            "in": "query",
            "name": "freq",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "preview cache-bust, at most 64 bytes; ignored",
            "in": "query",
            "name": "v",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid or unknown parameter, identical endpoints, or path longer than map.dhm.profile.maxPathKm; no upstream call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Sharing disabled, or a public key that is unknown, hidden or has no position.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Per-client budget of cards not in the cache exceeded (map.dhm.profile.rateLimitPerMin). Retry-After gives the seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "map.dhm.profile.maxInFlight uncached profiles are already being fetched, or the server is drawing as many cards as it draws at once; nothing was done, and neither the per-client charge nor the share budget is spent. Retry-After gives the seconds to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "summary": "Share card of a terrain profile (1200x630 PNG, the og:image of /p)",
        "tags": [
          "config"
        ]
      }
    },
    "/api/traces/{hash}": {
      "get": {
        "description": "Returns all observer sightings for a packet hash.",
        "parameters": [
          {
            "in": "path",
            "name": "hash",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          }
        },
        "summary": "Get packet traces",
        "tags": [
          "packets"
        ]
      }
    }
  },
  "tags": [
    {
      "description": "Server administration and diagnostics",
      "name": "admin"
    },
    {
      "description": "Network analytics and statistics",
      "name": "analytics"
    },
    {
      "description": "Mesh channel operations",
      "name": "channels"
    },
    {
      "description": "Server configuration",
      "name": "config"
    },
    {
      "description": "Mesh node operations",
      "name": "nodes"
    },
    {
      "description": "Packet observer/gateway operations",
      "name": "observers"
    },
    {
      "description": "Packet capture and decoding",
      "name": "packets"
    }
  ]
}
