{
  "components": {
    "schemas": {
      "ASNNamesResponse": {
        "properties": {
          "names": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "required": [
          "names"
        ],
        "type": "object"
      },
      "ArchiveFlows": {
        "properties": {
          "archive": {
            "$ref": "#/components/schemas/ArchiveMeta"
          },
          "summary": {
            "$ref": "#/components/schemas/FlowSummary"
          }
        },
        "required": [
          "archive",
          "summary"
        ],
        "type": "object"
      },
      "ArchiveMeta": {
        "properties": {
          "closed": {
            "type": "boolean"
          },
          "dropped": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "end": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "merged": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "partial": {
            "type": "boolean"
          },
          "prefix": {
            "type": "string"
          },
          "prefix_id": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "records": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "start": {
            "format": "date-time",
            "type": "string"
          },
          "truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "closed",
          "dropped",
          "id",
          "merged",
          "prefix",
          "prefix_id",
          "records",
          "start",
          "truncated"
        ],
        "type": "object"
      },
      "ArchiveSamples": {
        "properties": {
          "archive": {
            "$ref": "#/components/schemas/ArchiveMeta"
          },
          "next_offset": {
            "format": "int64",
            "type": "integer"
          },
          "samples": {
            "items": {
              "$ref": "#/components/schemas/Rec"
            },
            "type": "array"
          }
        },
        "required": [
          "archive",
          "next_offset",
          "samples"
        ],
        "type": "object"
      },
      "AttackRecord": {
        "properties": {
          "action": {
            "type": "string"
          },
          "bps": {
            "type": "number"
          },
          "by": {
            "type": "string"
          },
          "deadline": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "decision": {
            "type": "string"
          },
          "detect_latency_ms": {
            "format": "int64",
            "type": "integer"
          },
          "dropped_packets": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "duration_s": {
            "type": "number"
          },
          "event": {
            "type": "string"
          },
          "id": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "incident": {
            "type": "string"
          },
          "on_timeout": {
            "type": "string"
          },
          "peak_bps": {
            "type": "number"
          },
          "peak_pps": {
            "type": "number"
          },
          "pps": {
            "type": "number"
          },
          "prefix": {
            "type": "string"
          },
          "resumed": {
            "type": "boolean"
          },
          "target": {
            "type": "string"
          },
          "time": {
            "format": "date-time",
            "type": "string"
          },
          "top": {},
          "vector": {
            "type": "string"
          },
          "vectors": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "action",
          "bps",
          "event",
          "id",
          "pps",
          "prefix",
          "time",
          "vector"
        ],
        "type": "object"
      },
      "AttackseriesPoint": {
        "properties": {
          "drop_bps": {
            "type": "number"
          },
          "drop_pps": {
            "type": "number"
          },
          "in_bps": {
            "type": "number"
          },
          "in_pps": {
            "type": "number"
          },
          "t": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "drop_bps",
          "drop_pps",
          "in_bps",
          "in_pps",
          "t"
        ],
        "type": "object"
      },
      "BGPIRRView": {
        "properties": {
          "as_sets": {
            "format": "int64",
            "type": "integer"
          },
          "asns": {
            "format": "int64",
            "type": "integer"
          },
          "error": {
            "type": "string"
          },
          "last_fetch": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "prefixes": {
            "format": "int64",
            "type": "integer"
          },
          "server": {
            "type": "string"
          }
        },
        "required": [
          "as_sets",
          "asns",
          "prefixes",
          "server"
        ],
        "type": "object"
      },
      "BGPPrefixView": {
        "properties": {
          "accepted": {
            "type": "boolean"
          },
          "advertised": {
            "type": "boolean"
          },
          "as_path": {
            "items": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            },
            "type": "array"
          },
          "error": {
            "type": "string"
          },
          "irr": {
            "type": "string"
          },
          "origin": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "peer": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "routed": {
            "type": "boolean"
          },
          "rpki": {
            "type": "string"
          },
          "since": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "tenant": {
            "type": "string"
          },
          "tunnel": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "accepted",
          "advertised",
          "as_path",
          "irr",
          "origin",
          "peer",
          "prefix",
          "routed",
          "rpki",
          "status",
          "tenant",
          "tunnel",
          "warnings"
        ],
        "type": "object"
      },
      "BGPRPKIView": {
        "properties": {
          "error": {
            "type": "string"
          },
          "last_sync": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "roas": {
            "format": "int64",
            "type": "integer"
          },
          "serial": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "server": {
            "type": "string"
          },
          "synced": {
            "type": "boolean"
          },
          "version": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "roas",
          "serial",
          "server",
          "synced",
          "version"
        ],
        "type": "object"
      },
      "BGPSessionView": {
        "properties": {
          "accepted": {
            "format": "int64",
            "type": "integer"
          },
          "asn": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "error": {
            "type": "string"
          },
          "gtsm": {
            "type": "boolean"
          },
          "kind": {
            "type": "string"
          },
          "max_prefixes": {
            "format": "int64",
            "type": "integer"
          },
          "md5": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "peer": {
            "type": "string"
          },
          "received": {
            "format": "int64",
            "type": "integer"
          },
          "since": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "tenant": {
            "type": "string"
          },
          "tunnel": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "uptime_s": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "accepted",
          "asn",
          "gtsm",
          "kind",
          "md5",
          "name",
          "peer",
          "received",
          "state",
          "uptime_s"
        ],
        "type": "object"
      },
      "BGPStaticView": {
        "properties": {
          "advertised": {
            "type": "boolean"
          },
          "error": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          }
        },
        "required": [
          "advertised",
          "prefix"
        ],
        "type": "object"
      },
      "BGPStatusView": {
        "properties": {
          "accepted_total": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "active": {
            "format": "int64",
            "type": "integer"
          },
          "enabled": {
            "type": "boolean"
          },
          "engine_error": {
            "type": "string"
          },
          "established": {
            "format": "int64",
            "type": "integer"
          },
          "flaps_total": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "irr": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BGPIRRView"
              }
            ],
            "nullable": true
          },
          "prefixes": {
            "format": "int64",
            "type": "integer"
          },
          "rejected_total": {
            "additionalProperties": {
              "format": "int64",
              "minimum": 0,
              "type": "integer"
            },
            "type": "object"
          },
          "rpki": {
            "items": {
              "$ref": "#/components/schemas/BGPRPKIView"
            },
            "type": "array"
          },
          "running": {
            "type": "boolean"
          },
          "sessions": {
            "format": "int64",
            "type": "integer"
          },
          "static_routes": {
            "items": {
              "$ref": "#/components/schemas/BGPStaticView"
            },
            "type": "array"
          },
          "withdrawn_total": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "active",
          "enabled",
          "established",
          "prefixes",
          "running",
          "sessions"
        ],
        "type": "object"
      },
      "Capabilities": {
        "properties": {
          "bgp": {
            "type": "boolean"
          },
          "flowspec": {
            "type": "boolean"
          },
          "gre": {
            "type": "boolean"
          },
          "incident_notes": {
            "type": "boolean"
          },
          "incident_terminate": {
            "type": "boolean"
          },
          "incidents": {
            "type": "boolean"
          },
          "interfaces": {
            "type": "boolean"
          },
          "license": {
            "type": "boolean"
          },
          "notifications": {
            "type": "boolean"
          },
          "pcap": {
            "type": "boolean"
          },
          "protection_editor": {
            "type": "boolean"
          },
          "reports_pdf": {
            "type": "boolean"
          },
          "rtbh": {
            "type": "boolean"
          },
          "sampling": {
            "type": "boolean"
          },
          "telemetry": {
            "type": "boolean"
          },
          "tenants": {
            "type": "boolean"
          },
          "threat_intel": {
            "type": "boolean"
          },
          "updates": {
            "type": "boolean"
          },
          "usage_billing": {
            "type": "boolean"
          },
          "users": {
            "type": "boolean"
          }
        },
        "required": [
          "bgp",
          "flowspec",
          "gre",
          "incident_notes",
          "incident_terminate",
          "incidents",
          "interfaces",
          "license",
          "notifications",
          "pcap",
          "protection_editor",
          "reports_pdf",
          "rtbh",
          "sampling",
          "telemetry",
          "tenants",
          "threat_intel",
          "updates",
          "usage_billing",
          "users"
        ],
        "type": "object"
      },
      "ClassReport": {
        "properties": {
          "bps": {
            "$ref": "#/components/schemas/Quantiles"
          },
          "current": {
            "$ref": "#/components/schemas/LearnThreshold"
          },
          "name": {
            "type": "string"
          },
          "pps": {
            "$ref": "#/components/schemas/Quantiles"
          },
          "suggested": {
            "$ref": "#/components/schemas/LearnThreshold"
          }
        },
        "required": [
          "bps",
          "current",
          "name",
          "pps",
          "suggested"
        ],
        "type": "object"
      },
      "ClassStat": {
        "properties": {
          "excess": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "packets": {
            "type": "number"
          }
        },
        "required": [
          "name",
          "packets"
        ],
        "type": "object"
      },
      "ClassView": {
        "properties": {
          "classes": {
            "items": {
              "$ref": "#/components/schemas/NamedStats"
            },
            "type": "array"
          },
          "id": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "prefix": {
            "type": "string"
          }
        },
        "required": [
          "classes",
          "id",
          "prefix"
        ],
        "type": "object"
      },
      "ConfigMatch": {
        "properties": {
          "any": {
            "type": "boolean"
          },
          "asn": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "country": {
            "type": "string"
          },
          "dst_port": {
            "type": "string"
          },
          "fragment": {
            "type": "string"
          },
          "icmp_code": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "icmp_type": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "length": {
            "type": "string"
          },
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PayloadMatch"
              }
            ],
            "nullable": true
          },
          "proto": {
            "type": "string"
          },
          "src_port": {
            "type": "string"
          },
          "tcp_flags": {
            "type": "string"
          },
          "ttl": {
            "type": "string"
          }
        },
        "required": [
          "any",
          "dst_port",
          "fragment",
          "icmp_code",
          "icmp_type",
          "length",
          "proto",
          "src_port",
          "tcp_flags",
          "ttl"
        ],
        "type": "object"
      },
      "CustomRuleRequest": {
        "properties": {
          "action": {
            "type": "string"
          },
          "bps": {
            "type": "number"
          },
          "disabled": {
            "type": "boolean"
          },
          "expires": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "match": {
            "$ref": "#/components/schemas/ConfigMatch"
          },
          "name": {
            "type": "string"
          },
          "pps": {
            "type": "number"
          },
          "priority": {
            "format": "int64",
            "type": "integer"
          },
          "scope": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "when": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "match",
          "priority",
          "when"
        ],
        "type": "object"
      },
      "CustomRuleView": {
        "properties": {
          "action": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "added": {
            "format": "date-time",
            "type": "string"
          },
          "bps": {
            "type": "number"
          },
          "by": {
            "type": "string"
          },
          "disabled": {
            "type": "boolean"
          },
          "expires": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "match": {
            "$ref": "#/components/schemas/ConfigMatch"
          },
          "name": {
            "type": "string"
          },
          "pps": {
            "type": "number"
          },
          "prefix": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "priority": {
            "format": "int64",
            "type": "integer"
          },
          "scope": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "stats": {
            "$ref": "#/components/schemas/Stats"
          },
          "updated": {
            "format": "date-time",
            "type": "string"
          },
          "when": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "active",
          "added",
          "id",
          "match",
          "prefix",
          "priority",
          "stats",
          "when"
        ],
        "type": "object"
      },
      "CustomRulesView": {
        "properties": {
          "can_edit": {
            "type": "boolean"
          },
          "configured_mode": {
            "type": "string"
          },
          "limit": {
            "format": "int64",
            "type": "integer"
          },
          "prefix": {
            "type": "string"
          },
          "prefix_id": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/CustomRuleView"
            },
            "type": "array"
          },
          "tenant": {
            "type": "string"
          }
        },
        "required": [
          "can_edit",
          "configured_mode",
          "limit",
          "prefix",
          "prefix_id",
          "rules"
        ],
        "type": "object"
      },
      "EscalationView": {
        "properties": {
          "action": {
            "type": "string"
          },
          "advertised": {
            "type": "boolean"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "dst_ports": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "expired": {
            "type": "boolean"
          },
          "expires": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "kind": {
            "type": "string"
          },
          "length": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "proto": {
            "type": "string"
          },
          "rate_bps": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "reason": {
            "type": "string"
          },
          "remaining_s": {
            "type": "number"
          },
          "source": {
            "type": "string"
          },
          "src_ports": {
            "type": "string"
          },
          "src_prefix": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "tenant": {
            "type": "string"
          }
        },
        "required": [
          "advertised",
          "created",
          "expired",
          "expires",
          "id",
          "kind",
          "prefix",
          "remaining_s",
          "source",
          "status",
          "tenant"
        ],
        "type": "object"
      },
      "Flow": {
        "properties": {
          "bytes_est": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "dport": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "dst": {
            "type": "string"
          },
          "first_ms": {
            "format": "int64",
            "type": "integer"
          },
          "last_ms": {
            "format": "int64",
            "type": "integer"
          },
          "packets_est": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "proto": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "samples": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "sport": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "src": {
            "type": "string"
          },
          "verdict": {
            "type": "string"
          }
        },
        "required": [
          "bytes_est",
          "dst",
          "first_ms",
          "last_ms",
          "packets_est",
          "proto",
          "samples",
          "src",
          "verdict"
        ],
        "type": "object"
      },
      "FlowSummary": {
        "properties": {
          "bytes_est": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "distinct_sources": {
            "format": "int64",
            "type": "integer"
          },
          "flows": {
            "items": {
              "$ref": "#/components/schemas/Flow"
            },
            "type": "array"
          },
          "packets_est": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "total_flows": {
            "format": "int64",
            "type": "integer"
          },
          "truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "bytes_est",
          "distinct_sources",
          "flows",
          "packets_est",
          "total_flows",
          "truncated"
        ],
        "type": "object"
      },
      "HealthResponse": {
        "properties": {
          "status": {
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "HealthSummary": {
        "properties": {
          "cpu_avg_pct": {
            "type": "number"
          },
          "cpu_max_pct": {
            "type": "number"
          },
          "disk_free_pct": {
            "type": "number"
          },
          "hostname": {
            "type": "string"
          },
          "issues": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "load1": {
            "type": "number"
          },
          "mem_used_pct": {
            "type": "number"
          },
          "status": {
            "type": "string"
          },
          "uptime_s": {
            "type": "number"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "cpu_avg_pct",
          "cpu_max_pct",
          "disk_free_pct",
          "hostname",
          "issues",
          "load1",
          "mem_used_pct",
          "status",
          "uptime_s",
          "version"
        ],
        "type": "object"
      },
      "HostInfo": {
        "properties": {
          "addr": {
            "type": "string"
          },
          "stats": {
            "$ref": "#/components/schemas/Stats"
          }
        },
        "required": [
          "addr",
          "stats"
        ],
        "type": "object"
      },
      "HostRow": {
        "properties": {
          "addr": {
            "type": "string"
          },
          "est_pps": {
            "nullable": true,
            "type": "number"
          },
          "est_share": {
            "nullable": true,
            "type": "number"
          },
          "stats": {
            "$ref": "#/components/schemas/Stats"
          }
        },
        "required": [
          "addr",
          "est_pps",
          "est_share",
          "stats"
        ],
        "type": "object"
      },
      "Identity": {
        "properties": {
          "name": {
            "type": "string"
          },
          "pid": {
            "format": "int64",
            "type": "integer"
          },
          "read_only": {
            "type": "boolean"
          },
          "remote": {
            "type": "string"
          },
          "restricted": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "tenant": {
            "type": "string"
          },
          "uid": {
            "format": "int64",
            "type": "integer"
          },
          "via": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "pid",
          "role",
          "uid"
        ],
        "type": "object"
      },
      "IncidentApproval": {
        "properties": {
          "deadline": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "decided_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "decided_by": {
            "type": "string"
          },
          "decision": {
            "type": "string"
          },
          "on_timeout": {
            "type": "string"
          },
          "since": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "wait_s": {
            "type": "number"
          }
        },
        "required": [
          "since",
          "status"
        ],
        "type": "object"
      },
      "IncidentDetail": {
        "properties": {
          "action": {
            "type": "string"
          },
          "approval": {
            "allOf": [
              {
                "$ref": "#/components/schemas/IncidentApproval"
              }
            ],
            "nullable": true
          },
          "detect_latency_ms": {
            "format": "int64",
            "type": "integer"
          },
          "dropped_packets": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "duration_s": {
            "type": "number"
          },
          "end": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "end_action": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "note_count": {
            "format": "int64",
            "type": "integer"
          },
          "notes": {
            "items": {
              "$ref": "#/components/schemas/IncidentNote"
            },
            "type": "array"
          },
          "peak_bps": {
            "type": "number"
          },
          "peak_pps": {
            "type": "number"
          },
          "prefix": {
            "type": "string"
          },
          "prefix_id": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "resumed": {
            "type": "boolean"
          },
          "start": {
            "format": "date-time",
            "type": "string"
          },
          "start_bps": {
            "type": "number"
          },
          "start_pps": {
            "type": "number"
          },
          "status": {
            "type": "string"
          },
          "tenant": {
            "type": "string"
          },
          "terminated_by": {
            "type": "string"
          },
          "top_end": {},
          "top_start": {},
          "vector": {
            "type": "string"
          },
          "vectors": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "action",
          "detect_latency_ms",
          "dropped_packets",
          "duration_s",
          "end",
          "end_action",
          "id",
          "note_count",
          "notes",
          "peak_bps",
          "peak_pps",
          "prefix",
          "prefix_id",
          "resumed",
          "start",
          "start_bps",
          "start_pps",
          "status",
          "vector",
          "vectors"
        ],
        "type": "object"
      },
      "IncidentList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/IncidentView"
            },
            "type": "array"
          },
          "next": {
            "nullable": true,
            "type": "string"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "next",
          "total"
        ],
        "type": "object"
      },
      "IncidentNote": {
        "properties": {
          "author": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "time": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "author",
          "text",
          "time"
        ],
        "type": "object"
      },
      "IncidentView": {
        "properties": {
          "action": {
            "type": "string"
          },
          "approval": {
            "allOf": [
              {
                "$ref": "#/components/schemas/IncidentApproval"
              }
            ],
            "nullable": true
          },
          "detect_latency_ms": {
            "format": "int64",
            "type": "integer"
          },
          "dropped_packets": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "duration_s": {
            "type": "number"
          },
          "end": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "end_action": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "note_count": {
            "format": "int64",
            "type": "integer"
          },
          "peak_bps": {
            "type": "number"
          },
          "peak_pps": {
            "type": "number"
          },
          "prefix": {
            "type": "string"
          },
          "prefix_id": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "resumed": {
            "type": "boolean"
          },
          "start": {
            "format": "date-time",
            "type": "string"
          },
          "start_bps": {
            "type": "number"
          },
          "start_pps": {
            "type": "number"
          },
          "status": {
            "type": "string"
          },
          "tenant": {
            "type": "string"
          },
          "terminated_by": {
            "type": "string"
          },
          "top_end": {},
          "top_start": {},
          "vector": {
            "type": "string"
          },
          "vectors": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "action",
          "detect_latency_ms",
          "dropped_packets",
          "duration_s",
          "end",
          "end_action",
          "id",
          "note_count",
          "peak_bps",
          "peak_pps",
          "prefix",
          "prefix_id",
          "resumed",
          "start",
          "start_bps",
          "start_pps",
          "status",
          "vector",
          "vectors"
        ],
        "type": "object"
      },
      "LearnReport": {
        "properties": {
          "attack_s": {
            "type": "number"
          },
          "classes": {
            "items": {
              "$ref": "#/components/schemas/ClassReport"
            },
            "type": "array"
          },
          "last_seen": {
            "format": "date-time",
            "type": "string"
          },
          "min_observed_s": {
            "type": "number"
          },
          "observed_s": {
            "type": "number"
          },
          "prefix_id": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "ready": {
            "type": "boolean"
          },
          "since": {
            "format": "date-time",
            "type": "string"
          },
          "suggested_thresholds_json": {
            "type": "string"
          },
          "would_actions": {
            "items": {
              "$ref": "#/components/schemas/Would"
            },
            "type": "array"
          }
        },
        "required": [
          "attack_s",
          "classes",
          "last_seen",
          "min_observed_s",
          "observed_s",
          "prefix_id",
          "ready",
          "since",
          "suggested_thresholds_json"
        ],
        "type": "object"
      },
      "LearnThreshold": {
        "properties": {
          "bps": {
            "type": "number"
          },
          "pps": {
            "type": "number"
          }
        },
        "required": [
          "bps",
          "pps"
        ],
        "type": "object"
      },
      "LearningView": {
        "properties": {
          "learning": {
            "type": "boolean"
          },
          "prefix": {
            "type": "string"
          },
          "prefix_id": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "report": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LearnReport"
              }
            ],
            "nullable": true
          },
          "tenant": {
            "type": "string"
          }
        },
        "required": [
          "learning",
          "prefix",
          "prefix_id"
        ],
        "type": "object"
      },
      "ModeRequest": {
        "properties": {
          "mode": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "mode"
        ],
        "type": "object"
      },
      "ModeResponse": {
        "properties": {
          "id": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "mode": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "mode",
          "prefix"
        ],
        "type": "object"
      },
      "MyChannel": {
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "self": {
            "type": "boolean"
          },
          "target": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "id",
          "name",
          "target",
          "type"
        ],
        "type": "object"
      },
      "MyDelivery": {
        "properties": {
          "channel": {
            "type": "string"
          },
          "result": {
            "type": "string"
          },
          "time": {
            "format": "date-time",
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "channel",
          "result",
          "time",
          "title",
          "type"
        ],
        "type": "object"
      },
      "MyGroup": {
        "properties": {
          "id": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "prefixes": {
            "items": {
              "$ref": "#/components/schemas/MyPrefix"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "prefixes"
        ],
        "type": "object"
      },
      "MyLimiter": {
        "properties": {
          "bps": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "pps": {
            "type": "number"
          },
          "scope": {
            "type": "string"
          }
        },
        "required": [
          "bps",
          "name",
          "pps",
          "scope"
        ],
        "type": "object"
      },
      "MyNotifications": {
        "properties": {
          "channels": {
            "items": {
              "$ref": "#/components/schemas/MyChannel"
            },
            "type": "array"
          },
          "history": {
            "items": {
              "$ref": "#/components/schemas/MyDelivery"
            },
            "type": "array"
          }
        },
        "required": [
          "channels",
          "history"
        ],
        "type": "object"
      },
      "MyNotifyInput": {
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "language": {
            "type": "string"
          },
          "recipients": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "enabled",
          "events",
          "language",
          "recipients"
        ],
        "type": "object"
      },
      "MyNotifySettings": {
        "properties": {
          "available": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          },
          "event_types": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "language": {
            "type": "string"
          },
          "recipients": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "sender": {
            "type": "string"
          }
        },
        "required": [
          "available",
          "enabled",
          "event_types",
          "events",
          "language",
          "recipients"
        ],
        "type": "object"
      },
      "MyNotifyTestResult": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "required": [
          "ok"
        ],
        "type": "object"
      },
      "MyPrefix": {
        "properties": {
          "cidr": {
            "type": "string"
          },
          "configured": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "group": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "id": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "mode": {
            "type": "string"
          },
          "profile": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "cidr",
          "configured",
          "group",
          "id",
          "mode",
          "profile"
        ],
        "type": "object"
      },
      "MyProfile": {
        "properties": {
          "features": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "proto_allow": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/MyRule"
            },
            "type": "array"
          }
        },
        "required": [
          "features",
          "id",
          "name",
          "proto_allow",
          "rules"
        ],
        "type": "object"
      },
      "MyProtection": {
        "properties": {
          "groups": {
            "items": {
              "$ref": "#/components/schemas/MyGroup"
            },
            "type": "array"
          },
          "limiters": {
            "items": {
              "$ref": "#/components/schemas/MyLimiter"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "prefixes": {
            "items": {
              "$ref": "#/components/schemas/MyPrefix"
            },
            "type": "array"
          },
          "profiles": {
            "items": {
              "$ref": "#/components/schemas/MyProfile"
            },
            "type": "array"
          },
          "quota_bps": {
            "type": "number"
          },
          "tenant": {
            "type": "string"
          }
        },
        "required": [
          "groups",
          "limiters",
          "name",
          "plan",
          "prefixes",
          "profiles",
          "quota_bps",
          "tenant"
        ],
        "type": "object"
      },
      "MyRule": {
        "properties": {
          "action": {
            "type": "string"
          },
          "drops": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "limiter": {
            "type": "string"
          },
          "match": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "packets": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "action",
          "drops",
          "match",
          "name",
          "packets"
        ],
        "type": "object"
      },
      "NamedStats": {
        "properties": {
          "name": {
            "type": "string"
          },
          "stats": {
            "$ref": "#/components/schemas/Stats"
          }
        },
        "required": [
          "name",
          "stats"
        ],
        "type": "object"
      },
      "Overview": {
        "properties": {
          "active_incidents": {
            "items": {
              "$ref": "#/components/schemas/IncidentView"
            },
            "type": "array"
          },
          "capabilities": {
            "$ref": "#/components/schemas/Capabilities"
          },
          "health": {
            "allOf": [
              {
                "$ref": "#/components/schemas/HealthSummary"
              }
            ],
            "nullable": true
          },
          "prefixes": {
            "$ref": "#/components/schemas/PrefixSummary"
          },
          "rates": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RateSnapshot"
              }
            ],
            "nullable": true
          },
          "recent_incidents": {
            "items": {
              "$ref": "#/components/schemas/IncidentView"
            },
            "type": "array"
          },
          "sample_rate": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "scope": {
            "type": "string"
          },
          "tenant": {
            "type": "string"
          },
          "time": {
            "format": "date-time",
            "type": "string"
          },
          "top_prefixes": {
            "items": {
              "$ref": "#/components/schemas/TopEntry"
            },
            "type": "array"
          },
          "top_targets": {
            "items": {
              "$ref": "#/components/schemas/TopEntry"
            },
            "type": "array"
          },
          "totals": {
            "$ref": "#/components/schemas/OverviewTotals"
          }
        },
        "required": [
          "active_incidents",
          "capabilities",
          "health",
          "prefixes",
          "rates",
          "recent_incidents",
          "sample_rate",
          "scope",
          "time",
          "top_prefixes",
          "top_targets",
          "totals"
        ],
        "type": "object"
      },
      "OverviewTotals": {
        "properties": {
          "bytes": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "drop_bytes": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "drop_packets": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "packets": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "wd_packets": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "bytes",
          "drop_bytes",
          "drop_packets",
          "packets",
          "wd_packets"
        ],
        "type": "object"
      },
      "PayloadMatch": {
        "properties": {
          "ascii": {
            "type": "string"
          },
          "hex": {
            "type": "string"
          },
          "mask": {
            "type": "string"
          },
          "offset": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "template": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "PrefixListAdd": {
        "properties": {
          "cidr": {
            "type": "string"
          },
          "comment": {
            "type": "string"
          }
        },
        "required": [
          "cidr"
        ],
        "type": "object"
      },
      "PrefixListEntry": {
        "properties": {
          "added": {
            "format": "date-time",
            "type": "string"
          },
          "by": {
            "type": "string"
          },
          "cidr": {
            "type": "string"
          },
          "comment": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "prefix": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "added",
          "cidr",
          "kind",
          "prefix"
        ],
        "type": "object"
      },
      "PrefixListView": {
        "properties": {
          "allow": {
            "items": {
              "$ref": "#/components/schemas/PrefixListEntry"
            },
            "type": "array"
          },
          "can_edit": {
            "type": "boolean"
          },
          "deny": {
            "items": {
              "$ref": "#/components/schemas/PrefixListEntry"
            },
            "type": "array"
          },
          "limit": {
            "format": "int64",
            "type": "integer"
          },
          "prefix": {
            "type": "string"
          },
          "prefix_id": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "tenant": {
            "type": "string"
          }
        },
        "required": [
          "allow",
          "can_edit",
          "deny",
          "limit",
          "prefix",
          "prefix_id"
        ],
        "type": "object"
      },
      "PrefixSummary": {
        "properties": {
          "bypass": {
            "format": "int64",
            "type": "integer"
          },
          "enforce": {
            "format": "int64",
            "type": "integer"
          },
          "sensor": {
            "format": "int64",
            "type": "integer"
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "bypass",
          "enforce",
          "sensor",
          "total"
        ],
        "type": "object"
      },
      "PrefixView": {
        "properties": {
          "configured_mode": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "group": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "id": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "mode": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "mode_name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "profile": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "stats": {
            "$ref": "#/components/schemas/Stats"
          },
          "tenant": {
            "type": "string"
          }
        },
        "required": [
          "group",
          "id",
          "mode",
          "mode_name",
          "prefix",
          "profile",
          "stats"
        ],
        "type": "object"
      },
      "Quantiles": {
        "properties": {
          "max": {
            "type": "number"
          },
          "p50": {
            "type": "number"
          },
          "p95": {
            "type": "number"
          },
          "p99": {
            "type": "number"
          }
        },
        "required": [
          "max",
          "p50",
          "p95",
          "p99"
        ],
        "type": "object"
      },
      "QuotaView": {
        "properties": {
          "now_bps": {
            "type": "number"
          },
          "percent": {
            "type": "number"
          },
          "quota_bps": {
            "type": "number"
          },
          "state": {
            "type": "string"
          }
        },
        "required": [
          "now_bps",
          "percent",
          "quota_bps",
          "state"
        ],
        "type": "object"
      },
      "RateSnapshot": {
        "properties": {
          "clean_bps": {
            "type": "number"
          },
          "drop_bps": {
            "type": "number"
          },
          "drop_pps": {
            "type": "number"
          },
          "rx_bps": {
            "type": "number"
          },
          "rx_pps": {
            "type": "number"
          },
          "wd_bps": {
            "type": "number"
          },
          "window_secs": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "clean_bps",
          "drop_bps",
          "drop_pps",
          "rx_bps",
          "rx_pps",
          "wd_bps",
          "window_secs"
        ],
        "type": "object"
      },
      "ReasonStat": {
        "properties": {
          "name": {
            "type": "string"
          },
          "packets": {
            "type": "number"
          },
          "peak_pps": {
            "type": "number"
          }
        },
        "required": [
          "name",
          "packets",
          "peak_pps"
        ],
        "type": "object"
      },
      "Rec": {
        "properties": {
          "c": {
            "type": "string"
          },
          "dp": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "dst": {
            "type": "string"
          },
          "flags": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "len": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "n": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "proto": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "r": {
            "type": "string"
          },
          "sp": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "src": {
            "type": "string"
          },
          "t": {
            "format": "int64",
            "type": "integer"
          },
          "ttl": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "v": {
            "type": "string"
          },
          "w": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "dst",
          "len",
          "proto",
          "src",
          "t",
          "v",
          "w"
        ],
        "type": "object"
      },
      "ReportMeta": {
        "properties": {
          "by": {
            "type": "string"
          },
          "bytes": {
            "format": "int64",
            "type": "integer"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "def": {
            "type": "string"
          },
          "from": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "pages": {
            "format": "int64",
            "type": "integer"
          },
          "period": {
            "type": "string"
          },
          "sha256": {
            "type": "string"
          },
          "tenant": {
            "type": "string"
          },
          "to": {
            "format": "date-time",
            "type": "string"
          },
          "trigger": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "bytes",
          "created",
          "from",
          "id",
          "name",
          "pages",
          "period",
          "sha256",
          "to",
          "type"
        ],
        "type": "object"
      },
      "Series": {
        "properties": {
          "classes": {
            "items": {
              "$ref": "#/components/schemas/ClassStat"
            },
            "type": "array"
          },
          "end": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "partial": {
            "type": "boolean"
          },
          "points": {
            "items": {
              "$ref": "#/components/schemas/AttackseriesPoint"
            },
            "type": "array"
          },
          "prefix": {
            "type": "string"
          },
          "prefix_id": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "reasons": {
            "items": {
              "$ref": "#/components/schemas/ReasonStat"
            },
            "type": "array"
          },
          "start": {
            "format": "date-time",
            "type": "string"
          },
          "step_s": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "points",
          "prefix",
          "prefix_id",
          "start",
          "step_s"
        ],
        "type": "object"
      },
      "SeriesPoint": {
        "properties": {
          "clean_bps": {
            "type": "number"
          },
          "drop_bps": {
            "type": "number"
          },
          "drop_pps": {
            "type": "number"
          },
          "rx_bps": {
            "type": "number"
          },
          "rx_pps": {
            "type": "number"
          },
          "t": {
            "format": "int64",
            "type": "integer"
          },
          "wd_bps": {
            "type": "number"
          }
        },
        "required": [
          "clean_bps",
          "drop_bps",
          "drop_pps",
          "rx_bps",
          "rx_pps",
          "t",
          "wd_bps"
        ],
        "type": "object"
      },
      "SeriesResponse": {
        "properties": {
          "from": {
            "format": "date-time",
            "type": "string"
          },
          "points": {
            "items": {
              "$ref": "#/components/schemas/SeriesPoint"
            },
            "type": "array"
          },
          "prefix_id": {
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "res": {
            "type": "string"
          },
          "to": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "from",
          "points",
          "res",
          "to"
        ],
        "type": "object"
      },
      "Share": {
        "properties": {
          "est_pps": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "share": {
            "type": "number"
          }
        },
        "required": [
          "est_pps",
          "name",
          "share"
        ],
        "type": "object"
      },
      "Stats": {
        "properties": {
          "bytes": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "drop_bytes": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "drop_packets": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "packets": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "wd_bytes": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "wd_packets": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "bytes",
          "drop_bytes",
          "drop_packets",
          "packets",
          "wd_bytes",
          "wd_packets"
        ],
        "type": "object"
      },
      "TenantPrefix": {
        "properties": {
          "id": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "managed": {
            "type": "boolean"
          },
          "mode": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "managed",
          "mode",
          "prefix"
        ],
        "type": "object"
      },
      "TenantView": {
        "properties": {
          "active_attacks": {
            "format": "int64",
            "type": "integer"
          },
          "auth_prefixes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "can_edit_lists": {
            "type": "boolean"
          },
          "can_edit_rules": {
            "type": "boolean"
          },
          "can_set_mode": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "list_limit": {
            "format": "int64",
            "type": "integer"
          },
          "managed": {
            "type": "boolean"
          },
          "max_prefixes": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "prefixes": {
            "items": {
              "$ref": "#/components/schemas/TenantPrefix"
            },
            "type": "array"
          },
          "quota": {
            "$ref": "#/components/schemas/QuotaView"
          },
          "rule_limit": {
            "format": "int64",
            "type": "integer"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "active_attacks",
          "auth_prefixes",
          "can_edit_lists",
          "can_edit_rules",
          "can_set_mode",
          "id",
          "list_limit",
          "managed",
          "max_prefixes",
          "name",
          "plan",
          "prefixes",
          "quota",
          "rule_limit",
          "status"
        ],
        "type": "object"
      },
      "TokenInfo": {
        "properties": {
          "cidrs": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "expires": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "last_used": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "read_only": {
            "type": "boolean"
          },
          "user": {
            "type": "string"
          }
        },
        "required": [
          "created",
          "expires",
          "id",
          "name",
          "read_only",
          "user"
        ],
        "type": "object"
      },
      "TopEntry": {
        "properties": {
          "cc": {
            "type": "string"
          },
          "est_pps": {
            "type": "number"
          },
          "key": {
            "type": "string"
          },
          "max_err_pps": {
            "type": "number"
          },
          "share": {
            "type": "number"
          }
        },
        "required": [
          "est_pps",
          "key",
          "max_err_pps",
          "share"
        ],
        "type": "object"
      },
      "TopResponse": {
        "properties": {
          "available": {
            "type": "boolean"
          },
          "sample_rate": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "snapshot": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TopSnapshot"
              }
            ],
            "nullable": true
          }
        },
        "required": [
          "available",
          "sample_rate"
        ],
        "type": "object"
      },
      "TopSnapshot": {
        "properties": {
          "asns": {
            "items": {
              "$ref": "#/components/schemas/TopEntry"
            },
            "type": "array"
          },
          "classes": {
            "items": {
              "$ref": "#/components/schemas/Share"
            },
            "type": "array"
          },
          "complete": {
            "type": "boolean"
          },
          "countries": {
            "items": {
              "$ref": "#/components/schemas/TopEntry"
            },
            "type": "array"
          },
          "distinct_sources_est": {
            "type": "number"
          },
          "dst_ports": {
            "items": {
              "$ref": "#/components/schemas/TopEntry"
            },
            "type": "array"
          },
          "est_bps": {
            "type": "number"
          },
          "est_pps": {
            "type": "number"
          },
          "estimated": {
            "type": "boolean"
          },
          "prefix_id": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "prefixes": {
            "items": {
              "$ref": "#/components/schemas/TopEntry"
            },
            "type": "array"
          },
          "protocols": {
            "items": {
              "$ref": "#/components/schemas/Share"
            },
            "type": "array"
          },
          "reasons": {
            "items": {
              "$ref": "#/components/schemas/Share"
            },
            "type": "array"
          },
          "samples": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "sizes": {
            "items": {
              "$ref": "#/components/schemas/Share"
            },
            "type": "array"
          },
          "source_nets": {
            "items": {
              "$ref": "#/components/schemas/TopEntry"
            },
            "type": "array"
          },
          "sources": {
            "items": {
              "$ref": "#/components/schemas/TopEntry"
            },
            "type": "array"
          },
          "src_ports": {
            "items": {
              "$ref": "#/components/schemas/TopEntry"
            },
            "type": "array"
          },
          "targets": {
            "items": {
              "$ref": "#/components/schemas/TopEntry"
            },
            "type": "array"
          },
          "tcp_flags": {
            "items": {
              "$ref": "#/components/schemas/Share"
            },
            "type": "array"
          },
          "verdicts": {
            "items": {
              "$ref": "#/components/schemas/Share"
            },
            "type": "array"
          },
          "window_secs": {
            "type": "number"
          },
          "window_start": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "classes",
          "complete",
          "distinct_sources_est",
          "dst_ports",
          "est_bps",
          "est_pps",
          "estimated",
          "prefix_id",
          "protocols",
          "reasons",
          "samples",
          "sizes",
          "source_nets",
          "sources",
          "src_ports",
          "targets",
          "tcp_flags",
          "verdicts",
          "window_secs",
          "window_start"
        ],
        "type": "object"
      },
      "TunnelBGP": {
        "properties": {
          "as_set": {
            "type": "string"
          },
          "asn": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "disabled": {
            "type": "boolean"
          },
          "group": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "irr": {
            "type": "string"
          },
          "max_len_v4": {
            "format": "int64",
            "type": "integer"
          },
          "max_len_v6": {
            "format": "int64",
            "type": "integer"
          },
          "max_prefixes": {
            "format": "int64",
            "type": "integer"
          },
          "mode": {
            "type": "string"
          },
          "profile": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "rpki": {
            "type": "string"
          }
        },
        "required": [
          "asn"
        ],
        "type": "object"
      },
      "TunnelHealthView": {
        "properties": {
          "bgp": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "failures": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "last_ok": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "last_rtt_ms": {
            "type": "number"
          },
          "loss_pct": {
            "type": "number"
          },
          "overall": {
            "type": "string"
          },
          "probe": {
            "type": "string"
          },
          "probes": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "reason": {
            "type": "string"
          },
          "rtt_ms": {
            "type": "number"
          },
          "since": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "failures",
          "last_rtt_ms",
          "loss_pct",
          "overall",
          "probe",
          "probes",
          "rtt_ms"
        ],
        "type": "object"
      },
      "TunnelLive": {
        "properties": {
          "addrs": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "error": {
            "type": "string"
          },
          "health": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TunnelHealthView"
              }
            ],
            "nullable": true
          },
          "ifname": {
            "type": "string"
          },
          "last_action": {
            "type": "string"
          },
          "mtu": {
            "format": "int64",
            "type": "integer"
          },
          "oper_up": {
            "type": "boolean"
          },
          "present": {
            "type": "boolean"
          },
          "rx_bytes": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "rx_dropped": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "rx_errors": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "rx_packets": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "tx_bytes": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "tx_dropped": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "tx_errors": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "tx_packets": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "up": {
            "type": "boolean"
          }
        },
        "required": [
          "addrs",
          "ifname",
          "mtu",
          "oper_up",
          "present",
          "rx_bytes",
          "rx_dropped",
          "rx_errors",
          "rx_packets",
          "tx_bytes",
          "tx_dropped",
          "tx_errors",
          "tx_packets",
          "up"
        ],
        "type": "object"
      },
      "TunnelSystem": {
        "properties": {
          "clamp_error": {
            "type": "string"
          },
          "errors": {
            "format": "int64",
            "type": "integer"
          },
          "ip_forward": {
            "type": "boolean"
          },
          "oper_up": {
            "format": "int64",
            "type": "integer"
          },
          "present": {
            "format": "int64",
            "type": "integer"
          },
          "tunnels": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "errors",
          "ip_forward",
          "oper_up",
          "present",
          "tunnels"
        ],
        "type": "object"
      },
      "TunnelView": {
        "properties": {
          "bgp": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TunnelBGP"
              }
            ],
            "nullable": true
          },
          "comment": {
            "type": "string"
          },
          "disabled": {
            "type": "boolean"
          },
          "id": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "inner_local": {
            "type": "string"
          },
          "inner_peer": {
            "type": "string"
          },
          "key": {
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "live": {
            "$ref": "#/components/schemas/TunnelLive"
          },
          "local": {
            "type": "string"
          },
          "mss_clamp": {
            "type": "boolean"
          },
          "mtu": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "no_probe": {
            "type": "boolean"
          },
          "remote": {
            "type": "string"
          },
          "routes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "tenant": {
            "type": "string"
          },
          "ttl": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "disabled",
          "id",
          "live",
          "local",
          "mss_clamp",
          "mtu",
          "name",
          "no_probe",
          "remote",
          "routes",
          "tenant",
          "ttl"
        ],
        "type": "object"
      },
      "UsageReport": {
        "properties": {
          "clean_tb": {
            "type": "number"
          },
          "from": {
            "format": "date-time",
            "type": "string"
          },
          "generated": {
            "format": "date-time",
            "type": "string"
          },
          "month": {
            "type": "string"
          },
          "tenants": {
            "items": {
              "$ref": "#/components/schemas/UsageTenantReport"
            },
            "type": "array"
          },
          "to": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "clean_tb",
          "from",
          "generated",
          "month",
          "tenants",
          "to"
        ],
        "type": "object"
      },
      "UsageSample": {
        "properties": {
          "clean_bps_avg": {
            "type": "number"
          },
          "clean_bps_peak": {
            "type": "number"
          },
          "clean_bytes": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "drop_bps_peak": {
            "type": "number"
          },
          "drop_bytes": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "partial": {
            "type": "boolean"
          },
          "seconds": {
            "type": "number"
          },
          "start": {
            "format": "date-time",
            "type": "string"
          },
          "tenant": {
            "type": "string"
          },
          "total_bytes": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "clean_bps_avg",
          "clean_bps_peak",
          "clean_bytes",
          "drop_bps_peak",
          "drop_bytes",
          "seconds",
          "start",
          "tenant",
          "total_bytes"
        ],
        "type": "object"
      },
      "UsageTenantReport": {
        "properties": {
          "attack_seconds": {
            "type": "number"
          },
          "attacks": {
            "format": "int64",
            "type": "integer"
          },
          "avg_clean_bps": {
            "type": "number"
          },
          "clean_bytes": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "clean_tb": {
            "type": "number"
          },
          "drop_bytes": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "p95_clean_bps": {
            "type": "number"
          },
          "peak_clean_bps": {
            "type": "number"
          },
          "plan": {
            "type": "string"
          },
          "quota_bps": {
            "type": "number"
          },
          "quota_exceeded_samples": {
            "format": "int64",
            "type": "integer"
          },
          "samples": {
            "format": "int64",
            "type": "integer"
          },
          "tenant": {
            "type": "string"
          },
          "total_bytes": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "attack_seconds",
          "attacks",
          "avg_clean_bps",
          "clean_bytes",
          "clean_tb",
          "drop_bytes",
          "name",
          "p95_clean_bps",
          "peak_clean_bps",
          "plan",
          "quota_bps",
          "quota_exceeded_samples",
          "samples",
          "tenant",
          "total_bytes"
        ],
        "type": "object"
      },
      "Would": {
        "properties": {
          "kind": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "target": {
            "type": "string"
          },
          "time": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "target",
          "time"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearer": {
        "description": "API token (wsk_…) created in the panel: user menu → API tokens",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Read your protection status, attacks, traffic and reports, and manage your own lists, rules and notification settings. Requests are authenticated with an API token created in the customer portal.",
    "title": "WireShield Customer API",
    "version": "1.0.30"
  },
  "openapi": "3.0.3",
  "paths": {
    "/v1/attacks": {
      "get": {
        "operationId": "getAttacks",
        "parameters": [
          {
            "in": "query",
            "name": "n",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AttackRecord"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          }
        },
        "summary": "Attack events (tenant: own prefixes only)",
        "tags": [
          "Prefixes \u0026 attacks"
        ],
        "x-required-permission": "attack:read"
      }
    },
    "/v1/auth/tokens": {
      "get": {
        "operationId": "getAuthTokens",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TokenInfo"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          }
        },
        "summary": "My tokens",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/v1/bgp/prefixes": {
      "get": {
        "operationId": "getBgpPrefixes",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tunnel",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "prefix",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/BGPPrefixView"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid filter"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "BGP is not enabled on this appliance"
          }
        },
        "summary": "Every announcement received from customers and its decision: `active` (being announced to the router), `pending` (accepted, waiting for data plane/route), `rejected` (`reason` stable code: not-authorized, too-long, bogon, as-loop, first-as, origin-as, origin-set, recursive, rpki-invalid, rpki-notfound, irr-no-route, superseded, tenant-quota, no-next-hop ...). Warnings for accepted ones (`warnings`) and the RPKI/IRR result are shown",
        "tags": [
          "BGP"
        ],
        "x-required-permission": "bgp:read"
      }
    },
    "/v1/bgp/sessions": {
      "get": {
        "operationId": "getBgpSessions",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/BGPSessionView"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "BGP is not enabled on this appliance"
          }
        },
        "summary": "BGP sessions: customer sessions (per tunnel, peer AS, state, received/accepted prefixes) and router sessions (staff only). A tenant sees only its own customer sessions. `md5` and `gtsm` indicate the session is protected with TCP-MD5 / GTSM; the password itself never appears in any response",
        "tags": [
          "BGP"
        ],
        "x-required-permission": "bgp:read"
      }
    },
    "/v1/bgp/status": {
      "get": {
        "operationId": "getBgpStatus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BGPStatusView"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "BGP is not enabled on this appliance"
          }
        },
        "summary": "BGP summary: session count/established, received and announced prefix counts. Staff also see engine errors, total counters (accepted/withdrawn/per reject reason), and RPKI (RTR) and IRR source status; a tenant sees only its own summary",
        "tags": [
          "BGP"
        ],
        "x-required-permission": "bgp:read"
      }
    },
    "/v1/classes": {
      "get": {
        "operationId": "getClasses",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ClassView"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          }
        },
        "summary": "Per-prefix traffic class counters",
        "tags": [
          "Prefixes \u0026 attacks"
        ],
        "x-required-permission": "prefix:read"
      }
    },
    "/v1/escalations": {
      "get": {
        "operationId": "getEscalations",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/EscalationView"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Upstream entries need BGP to be enabled on this appliance"
          }
        },
        "summary": "Upstream entries (RTBH and FlowSpec): target, match, duration, remaining time, whether it is announced to the routers, announcement error. Source: manual (API/CLI), customer (the customer's BGP community; in memory only, removed when the customer withdraws), policy (suggestion awaiting approval). A tenant sees only its own entries",
        "tags": [
          "Upstream mitigation"
        ],
        "x-required-permission": "escalation:read"
      }
    },
    "/v1/escalations/{id}": {
      "get": {
        "operationId": "getEscalationsById",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EscalationView"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Entry not found (another tenant's entry also returns 404)"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Upstream entries need BGP to be enabled on this appliance"
          }
        },
        "summary": "Single entry",
        "tags": [
          "Upstream mitigation"
        ],
        "x-required-permission": "escalation:read"
      }
    },
    "/v1/events": {
      "get": {
        "operationId": "getEvents",
        "parameters": [
          {
            "description": "equivalent to the Last-Event-ID header",
            "in": "query",
            "name": "last_event_id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Event stream is not configured"
          },
          "503": {
            "description": "Too many subscribers (200 total, 5 per identity)"
          }
        },
        "summary": "Live event stream (Server-Sent Events). Events: attack.start, attack.end, prefix.mode, protection.changed, incident.note. Each event's `id` is monotonic and stays greater than previous ones across restarts; with `Last-Event-ID` (header or `last_event_id`) the last 1000 events are replayed, and if the events in between are no longer kept, `event: reset` is sent (re-read the state). A slow consumer is closed with `event: overflow`. A `: ping` every 15 s; the stream ends with `event: unauthorized` if the session/account/token becomes invalid. A tenant sees only attack/mode events for its own prefixes (no protection or note events). Events are notifications only: the source of truth is the event file and the state stores.",
        "tags": [
          "Live events"
        ],
        "x-required-permission": "prefix:read"
      }
    },
    "/v1/geo/asn-names": {
      "get": {
        "operationId": "getGeoAsnNames",
        "parameters": [
          {
            "in": "query",
            "name": "asn",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ASNNamesResponse"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid ASN / too many ASNs"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          }
        },
        "summary": "ASN organization names (from MaxMind ASN data; e.g. 13335 → Cloudflare, Inc.). `asn`: up to 200 comma-separated ASNs (AS prefix optional). Unknown ones are omitted from the response; empty if there is no database",
        "tags": [
          "GeoIP"
        ],
        "x-required-permission": "prefix:read"
      }
    },
    "/v1/health": {
      "get": {
        "operationId": "getHealth",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          }
        },
        "summary": "Health",
        "tags": [
          "System"
        ]
      }
    },
    "/v1/hosts": {
      "get": {
        "operationId": "getHosts",
        "parameters": [
          {
            "in": "query",
            "name": "n",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/HostInfo"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          }
        },
        "summary": "Top destinations by traffic (tenant: own prefixes only)",
        "tags": [
          "Prefixes \u0026 attacks"
        ],
        "x-required-permission": "prefix:read"
      }
    },
    "/v1/incidents": {
      "get": {
        "operationId": "getIncidents",
        "parameters": [
          {
            "description": "active | ended | terminated | closed (ended+terminated)",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "active",
                "ended",
                "terminated",
                "closed"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "prefix_id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "e.g. udp_flood, syn_flood",
            "in": "query",
            "name": "vector",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "start \u003e= from (RFC3339)",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "start \u003c= to (RFC3339)",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "page size (default 50, max 500)",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "`next` value from the previous response (opaque)",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IncidentList"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid parameter/cursor"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Attack records are not configured"
          }
        },
        "summary": "Attacks (incidents): filter and paginate; sorted by start time descending (tenant: own prefixes only)",
        "tags": [
          "Overview \u0026 attacks"
        ],
        "x-required-permission": "incident:read"
      }
    },
    "/v1/incidents/{id}": {
      "get": {
        "operationId": "getIncidentsById",
        "parameters": [
          {
            "description": "\u003cprefix_id\u003e-\u003cstart_unix\u003e",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IncidentDetail"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Not found (for a tenant, another tenant's incident also returns 404)"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Attack records are not configured"
          }
        },
        "summary": "Attack details: duration, peak values, vectors, start/end summaries (top sources), notes (tenants do not see notes)",
        "tags": [
          "Overview \u0026 attacks"
        ],
        "x-required-permission": "incident:read"
      }
    },
    "/v1/incidents/{id}/flows": {
      "get": {
        "operationId": "getIncidentsByIdFlows",
        "parameters": [
          {
            "description": "\u003cprefix_id\u003e-\u003cstart_unix\u003e",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "source IP or CIDR (sources may be spoofed)",
            "in": "query",
            "name": "src",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "destination IP or CIDR",
            "in": "query",
            "name": "dst",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "source port",
            "in": "query",
            "name": "sport",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "destination port",
            "in": "query",
            "name": "dport",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "tcp | udp | icmp | icmpv6 | gre | esp | sctp or 0-255",
            "in": "query",
            "name": "proto",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "pass | drop | would_drop | challenge",
            "in": "query",
            "name": "verdict",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "drop reason (e.g. rate, rule, blocklist)",
            "in": "query",
            "name": "reason",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "maximum flows (default 50, max 1000)",
            "in": "query",
            "name": "n",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArchiveFlows"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid filter/parameter"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Attack or its archive not found (for a tenant, another tenant's attack also returns 404)"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Attack records or the sample archive are disabled"
          }
        },
        "summary": "Flow summary of the attack archive: 5-tuple + weighted (estimated) packets/bytes per verdict, top N by packet count descending. `distinct_sources` is the number of unique sources; `truncated` indicates new keys were not counted because of too many distinct flows",
        "tags": [
          "Forensics"
        ],
        "x-required-permission": "incident:read"
      }
    },
    "/v1/incidents/{id}/samples": {
      "get": {
        "operationId": "getIncidentsByIdSamples",
        "parameters": [
          {
            "description": "\u003cprefix_id\u003e-\u003cstart_unix\u003e",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "source IP or CIDR (sources may be spoofed)",
            "in": "query",
            "name": "src",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "destination IP or CIDR",
            "in": "query",
            "name": "dst",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "source port",
            "in": "query",
            "name": "sport",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "destination port",
            "in": "query",
            "name": "dport",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "tcp | udp | icmp | icmpv6 | gre | esp | sctp or 0-255",
            "in": "query",
            "name": "proto",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "pass | drop | would_drop | challenge",
            "in": "query",
            "name": "verdict",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "drop reason (e.g. rate, rule, blocklist)",
            "in": "query",
            "name": "reason",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size (default 100, max 1000)",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "`next_offset` from the previous response",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArchiveSamples"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid filter/parameter"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Attack or its archive not found (for a tenant, another tenant's attack also returns 404)"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Attack records or the sample archive are disabled"
          }
        },
        "summary": "Raw sample archive of the attack: packet headers sampled by XDP (from 60 s before the attack to 60 s after; no payload). Each record is one sampled packet (`w` = number of packets it represents); samples above 2000 records per second are merged by weight (`n` = number of merged samples). During an active attack the archive is read with ~1 s delay (`archive.closed=false`); it is closed and compressed 60 s after the attack ends",
        "tags": [
          "Forensics"
        ],
        "x-required-permission": "incident:read"
      }
    },
    "/v1/incidents/{id}/series": {
      "get": {
        "operationId": "getIncidentsByIdSeries",
        "parameters": [
          {
            "description": "\u003cprefix_id\u003e-\u003cstart_unix\u003e",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Series"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Attack or series record not found (for a tenant, another tenant's incident also returns 404)"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Attack records or series recording are not configured"
          }
        },
        "summary": "Traffic time series of the attack: 10 s buckets (incoming / dropped pps and bit/s; including 5 min before and after the attack, downsampled for very long attacks), vector (traffic class) composition within the attack window and peak rate/total per countermeasure (drop reason) (estimated from sampling). Used by the PDF attack report and the chart",
        "tags": [
          "Overview \u0026 attacks"
        ],
        "x-required-permission": "incident:read"
      }
    },
    "/v1/my/notifications": {
      "get": {
        "operationId": "getMyNotifications",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MyNotifications"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "The tenant parameter is required for staff"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Customer not found"
          },
          "429": {
            "description": "Rate limited"
          }
        },
        "summary": "The customer's notification channels (target masked: scheme+host only) and recent deliveries (error details are not provided)",
        "tags": [
          "Customer account"
        ],
        "x-required-permission": "prefix:read"
      }
    },
    "/v1/my/notifications/settings": {
      "get": {
        "operationId": "getMyNotificationsSettings",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MyNotifySettings"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "The tenant parameter is required for staff"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Customer not found"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Notifications are not configured"
          }
        },
        "summary": "The customer's own e-mail notification settings: recipients, selected events (attack started/ended, report ready, prefix mode changed) and language. available=false when the provider has not offered an e-mail channel to customers. SMTP settings are never shown",
        "tags": [
          "Customer account"
        ],
        "x-required-permission": "prefix:read"
      },
      "put": {
        "operationId": "putMyNotificationsSettings",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MyNotifyInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MyNotifySettings"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Customer not found"
          },
          "409": {
            "description": "The provider has not offered e-mail notifications"
          },
          "422": {
            "description": "Invalid settings"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Notifications are not configured"
          },
          "503": {
            "description": "Audit record could not be written (operation not performed)"
          }
        },
        "summary": "Saves the customer's own e-mail notification settings (at most 10 recipients; only customer events can be selected; system/operator events are never sent to customers). Mail is sent through the e-mail channel the provider marked as open to customers; no recipients = the customer's channel and rule are removed. Audited (addresses are not written to the audit log)",
        "tags": [
          "Customer account"
        ],
        "x-audited": true,
        "x-required-permission": "mynotify:write"
      }
    },
    "/v1/my/notifications/test": {
      "post": {
        "operationId": "postMyNotificationsTest",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MyNotifyTestResult"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "409": {
            "description": "No enabled settings saved yet"
          },
          "429": {
            "description": "Wait a minute between tests"
          },
          "501": {
            "description": "Notifications are not configured"
          },
          "503": {
            "description": "Audit record could not be written (operation not performed)"
          }
        },
        "summary": "Sends a test e-mail to the customer's recipients (once a minute per customer). Error details are not returned to the customer; staff see them in the delivery history",
        "tags": [
          "Customer account"
        ],
        "x-audited": true,
        "x-required-permission": "mynotify:write"
      }
    },
    "/v1/my/protection": {
      "get": {
        "operationId": "getMyProtection",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MyProtection"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "The tenant parameter is required for staff"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Customer not found (another customer's also returns 404)"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "No protection configuration"
          }
        },
        "summary": "READ-ONLY, threshold-free summary of the protection applied to the customer's own prefixes: prefixes and operating mode, groups, protection features (SYN authentication, amplification filter, etc.), rules (name, action, readable match summary, packet/drop counts) and the rate limits in use. Detection thresholds and other customers' information are NOT included",
        "tags": [
          "Customer account"
        ],
        "x-required-permission": "prefix:read"
      }
    },
    "/v1/overview": {
      "get": {
        "operationId": "getOverview",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Overview"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          }
        },
        "summary": "Overview: rates, totals, active/recent attacks, most attacked destinations, system health, feature flags (tenant: own prefixes only)",
        "tags": [
          "Overview \u0026 attacks"
        ],
        "x-required-permission": "prefix:read"
      }
    },
    "/v1/prefixes": {
      "get": {
        "operationId": "getPrefixes",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PrefixView"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          }
        },
        "summary": "Protected prefixes (tenant: own only)",
        "tags": [
          "Prefixes \u0026 attacks"
        ],
        "x-required-permission": "prefix:read"
      }
    },
    "/v1/prefixes/{id}/hosts": {
      "get": {
        "operationId": "getPrefixesByIdHosts",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "maximum records (default 20, max 1000)",
            "in": "query",
            "name": "n",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/HostRow"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Prefix not found (for a tenant, another tenant's prefix also returns 404)"
          },
          "429": {
            "description": "Rate limited"
          }
        },
        "summary": "Destination IPs within the prefix: exact counters + (if available) estimated rate/share from sampling (Traffic Analyzer)",
        "tags": [
          "Overview \u0026 attacks"
        ],
        "x-required-permission": "prefix:read"
      }
    },
    "/v1/prefixes/{id}/learning": {
      "get": {
        "operationId": "getPrefixesByIdLearning",
        "parameters": [
          {
            "description": "prefix ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LearningView"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Prefix not found (for a tenant, another tenant's prefix also returns 404)"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Learning data is disabled"
          }
        },
        "summary": "Learning/monitor mode: while the prefix is in `mode: learning` no packets are dropped; detection and policies run but no action is applied ('would have' records appear in the attack list with `action=learning`). This endpoint returns the per-class pps/bit-s distribution (p50/p95/p99/peak) learned from NON-ATTACK (normal) traffic, the current static threshold in the profile and the **suggested threshold** (suggestion = max(p99×2, peak×1.25), floor 1000 pps / 10 Mbit/s, rounded up to two significant digits). `ready` becomes true after at least 6 hours of normal traffic are observed. The suggestion is informational: it is applied to the profile manually (with preview); `suggested_thresholds_json` is in the profile's `detection.thresholds` format",
        "tags": [
          "Baseline learning"
        ],
        "x-required-permission": "prefix:read"
      }
    },
    "/v1/prefixes/{id}/learning/reset": {
      "post": {
        "operationId": "postPrefixesByIdLearningReset",
        "parameters": [
          {
            "description": "prefix ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {},
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Prefix not found (for a tenant, another tenant's prefix also returns 404)"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Learning data is disabled"
          },
          "503": {
            "description": "Audit record could not be written (operation not performed)"
          }
        },
        "summary": "Delete the learned distribution (new learning period). Permission: mode change (management roles; a tenant only for its own prefix and if allowed)",
        "tags": [
          "Baseline learning"
        ],
        "x-audited": true,
        "x-required-permission": "mode:set"
      }
    },
    "/v1/prefixes/{id}/lists": {
      "get": {
        "operationId": "getPrefixesByIdLists",
        "parameters": [
          {
            "description": "protected prefix ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrefixListView"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Prefix not found or not visible"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Managed state store is disabled"
          }
        },
        "summary": "The prefix's customer allow/deny lists. A tenant sees ONLY its own prefix (another tenant's returns 404); the username of the user who added an entry is not shown to the tenant. `limit`: per-list quota for this identity, `can_edit`: write permission",
        "tags": [
          "Allow \u0026 deny lists"
        ],
        "x-required-permission": "prefixlist:read"
      }
    },
    "/v1/prefixes/{id}/lists/{kind}": {
      "delete": {
        "operationId": "deletePrefixesByIdListsByKind",
        "parameters": [
          {
            "description": "protected prefix ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "allow | deny",
            "in": "path",
            "name": "kind",
            "required": true,
            "schema": {
              "enum": [
                "allow",
                "deny"
              ],
              "type": "string"
            }
          },
          {
            "description": "entry to delete",
            "in": "query",
            "name": "cidr",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "cidr is missing"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Prefix or entry not found"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Managed state store is disabled"
          },
          "503": {
            "description": "Audit record could not be written (operation not performed)"
          }
        },
        "summary": "Delete an entry from the list (with `?cidr=`)",
        "tags": [
          "Allow \u0026 deny lists"
        ],
        "x-audited": true,
        "x-required-permission": "prefixlist:write"
      },
      "post": {
        "operationId": "postPrefixesByIdListsByKind",
        "parameters": [
          {
            "description": "protected prefix ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "allow | deny",
            "in": "path",
            "name": "kind",
            "required": true,
            "schema": {
              "enum": [
                "allow",
                "deny"
              ],
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrefixListAdd"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrefixListEntry"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Prefix not found or not visible"
          },
          "409": {
            "description": "Duplicate entry, or the same network is in the opposite list"
          },
          "422": {
            "description": "Invalid CIDR/quota exceeded"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Managed state store is disabled"
          },
          "503": {
            "description": "Audit record could not be written (operation not performed)"
          }
        },
        "summary": "Add an entry to the list (single IP or CIDR; v4 ≥ /8, v6 ≥ /32; loopback/multicast/link-local/reserved ranges are rejected). Order: global allow \u003e global deny \u003e **prefix allow** \u003e prefix deny \u003e …; a customer allow bypasses all remaining filters but cannot override the operator's global deny. A tenant needs the `can_edit_lists` policy and the `list_limit` quota",
        "tags": [
          "Allow \u0026 deny lists"
        ],
        "x-audited": true,
        "x-required-permission": "prefixlist:write"
      }
    },
    "/v1/prefixes/{id}/mode": {
      "put": {
        "operationId": "putPrefixesByIdMode",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModeResponse"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Audit record could not be written (operation not performed)"
          }
        },
        "summary": "Change the prefix mode (temporary). Tenant: own prefix only, if the tenant policy allows it, sensor/enforce only",
        "tags": [
          "Prefixes \u0026 attacks"
        ],
        "x-audited": true,
        "x-required-permission": "mode:set"
      }
    },
    "/v1/prefixes/{id}/rules": {
      "get": {
        "operationId": "getPrefixesByIdRules",
        "parameters": [
          {
            "description": "protected prefix ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomRulesView"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Prefix not found or not visible"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Managed state store is disabled"
          }
        },
        "summary": "The prefix's custom rules (in priority order) and their counters. A tenant sees only its own prefix; the username of the rule author is not shown to the tenant",
        "tags": [
          "Custom rules"
        ],
        "x-required-permission": "prefixlist:read"
      },
      "post": {
        "operationId": "postPrefixesByIdRules",
        "parameters": [
          {
            "description": "protected prefix ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomRuleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomRuleView"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Prefix or rule not found / not visible"
          },
          "422": {
            "description": "Invalid rule or quota exceeded"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Managed state store is disabled"
          },
          "503": {
            "description": "Audit record could not be written (operation not performed)"
          }
        },
        "summary": "Add a custom rule. Order: global allow/deny \u003e customer allow/deny lists \u003e malformed packets \u003e **custom rules** (by priority, first match wins) \u003e profile. `when=always`: an Automatic prefix applies it even when there is no attack; `attack`: only while filters are engaged. In Monitor/Learning no rule drops (counted as wd); in Bypass rules are not evaluated. `action=limit` is the rule's own limit (pps/bps, scope prefix|dst|src). A tenant needs `can_edit_rules` and `rule_limit`; a tenant's allow rule requires a specific source (v4 ≥ /16, v6 ≥ /48)",
        "tags": [
          "Custom rules"
        ],
        "x-audited": true,
        "x-required-permission": "prefixlist:write"
      }
    },
    "/v1/prefixes/{id}/rules/{rid}": {
      "delete": {
        "operationId": "deletePrefixesByIdRulesByRid",
        "parameters": [
          {
            "description": "protected prefix ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "custom rule ID",
            "in": "path",
            "name": "rid",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "format": "int32",
                    "minimum": 0,
                    "type": "integer"
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Prefix or rule not found"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Managed state store is disabled"
          },
          "503": {
            "description": "Audit record could not be written (operation not performed)"
          }
        },
        "summary": "Delete a custom rule",
        "tags": [
          "Custom rules"
        ],
        "x-audited": true,
        "x-required-permission": "prefixlist:write"
      },
      "put": {
        "operationId": "putPrefixesByIdRulesByRid",
        "parameters": [
          {
            "description": "protected prefix ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "custom rule ID",
            "in": "path",
            "name": "rid",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomRuleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomRuleView"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Prefix or rule not found / not visible"
          },
          "422": {
            "description": "Invalid rule or quota exceeded"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Managed state store is disabled"
          },
          "503": {
            "description": "Audit record could not be written (operation not performed)"
          }
        },
        "summary": "Replace a custom rule (all fields; ID and creation time are kept). Counters are reset when the content changes, and kept when only the priority changes",
        "tags": [
          "Custom rules"
        ],
        "x-audited": true,
        "x-required-permission": "prefixlist:write"
      }
    },
    "/v1/prefixes/{id}/series": {
      "get": {
        "operationId": "getPrefixesByIdSeries",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "1s (global and prefixes under attack only) | 10s (default) | 1m, 1h (disk series; missing point = 0)",
            "in": "query",
            "name": "res",
            "required": false,
            "schema": {
              "enum": [
                "1s",
                "10s",
                "1m",
                "1h"
              ],
              "type": "string"
            }
          },
          {
            "description": "RFC3339; default: 15 min ago for 1s, 1 h for 10s, 6 h for 1m, 7 days for 1h",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "RFC3339; default: now. Maximum range: 1s/10s 24 hours, 1m 7 days, 1h 400 days",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeriesResponse"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid parameter"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Prefix not found (for a tenant, another tenant's prefix also returns 404)"
          },
          "409": {
            "description": "1 s resolution is not kept for this prefix (not under attack)"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Telemetry or (for 1m/1h) disk series is not configured"
          }
        },
        "summary": "Prefix time series (pps/bps: rx, clean, dropped, would-drop)",
        "tags": [
          "Traffic"
        ],
        "x-required-permission": "prefix:read"
      }
    },
    "/v1/prefixes/{id}/top": {
      "get": {
        "operationId": "getPrefixesByIdTop",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TopResponse"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Prefix not found (for a tenant, another tenant's prefix also returns 404)"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Telemetry is not configured"
          }
        },
        "summary": "Sample-based summary: top sources, /24-/48, destinations, ports, protocols, distinct source estimate (ESTIMATED)",
        "tags": [
          "Traffic"
        ],
        "x-required-permission": "prefix:read"
      }
    },
    "/v1/reports": {
      "get": {
        "operationId": "getReports",
        "parameters": [
          {
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "enum": [
                "monthly_summary",
                "tenant_sla",
                "incident"
              ],
              "type": "string"
            }
          },
          {
            "description": "e.g. 2026-09",
            "in": "query",
            "name": "period",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "default 100, max 500",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ReportMeta"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Reports are not configured"
          }
        },
        "summary": "Generated reports (newest first). The tenant role sees ONLY its own reports (definition/generator/trigger fields are removed)",
        "tags": [
          "Reports"
        ],
        "x-required-permission": "report:read"
      }
    },
    "/v1/reports/{id}": {
      "get": {
        "operationId": "getReportsById",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportMeta"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Not found"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Reports are not configured"
          }
        },
        "summary": "Report metadata (another tenant's report returns 404)",
        "tags": [
          "Reports"
        ],
        "x-required-permission": "report:read"
      }
    },
    "/v1/reports/{id}/pdf": {
      "get": {
        "operationId": "getReportsByIdPdf",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Not found"
          },
          "429": {
            "description": "Rate limited"
          },
          "500": {
            "description": "File is corrupted (digest mismatch)"
          },
          "501": {
            "description": "Reports are not configured"
          }
        },
        "summary": "The report's PDF file (`Content-Disposition: attachment`, digest is verified)",
        "tags": [
          "Reports"
        ],
        "x-required-permission": "report:read"
      }
    },
    "/v1/tenants": {
      "get": {
        "operationId": "getTenants",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TenantView"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          }
        },
        "summary": "Tenants (the tenant role sees only itself): quota status, prefixes, active attacks",
        "tags": [
          "Account \u0026 usage"
        ],
        "x-required-permission": "tenant:read"
      }
    },
    "/v1/tenants/{id}": {
      "get": {
        "operationId": "getTenantsById",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantView"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          }
        },
        "summary": "Single tenant",
        "tags": [
          "Account \u0026 usage"
        ],
        "x-required-permission": "tenant:read"
      }
    },
    "/v1/tenants/{id}/usage": {
      "get": {
        "operationId": "getTenantsByIdUsage",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "step",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/UsageSample"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          }
        },
        "summary": "Tenant usage samples (5 min); aggregated by step",
        "tags": [
          "Account \u0026 usage"
        ],
        "x-required-permission": "usage:read"
      }
    },
    "/v1/tunnel-status": {
      "get": {
        "operationId": "getTunnelStatus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TunnelSystem"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Tunnels are not configured"
          }
        },
        "summary": "Tunnel system summary: number of tunnels, present in the kernel, operationally up, with errors; if `ip_forward` is off, clean traffic does not enter the tunnels; `clamp_error` if the MSS clamping rules could not be applied",
        "tags": [
          "GRE tunnels"
        ],
        "x-required-permission": "tunnel:read"
      }
    },
    "/v1/tunnels": {
      "get": {
        "operationId": "getTunnels",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TunnelView"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Tunnels are not configured"
          }
        },
        "summary": "Customer GRE tunnels and their live state in the kernel (whether the interface exists, admin/oper state, MTU, addresses, counters, last reconcile error) with a **health summary** (`live.health`: ICMP probe to the inner peer address + BGP session → ok | degraded | down | unknown | disabled, rtt, loss, counters). A tenant sees only its own tunnels",
        "tags": [
          "GRE tunnels"
        ],
        "x-required-permission": "tunnel:read"
      }
    },
    "/v1/tunnels/{id}": {
      "get": {
        "operationId": "getTunnelsById",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TunnelView"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "404": {
            "description": "Tunnel not found (another tenant's tunnel also returns 404)"
          },
          "429": {
            "description": "Rate limited"
          },
          "501": {
            "description": "Tunnels are not configured"
          }
        },
        "summary": "Single tunnel",
        "tags": [
          "GRE tunnels"
        ],
        "x-required-permission": "tunnel:read"
      }
    },
    "/v1/usage": {
      "get": {
        "operationId": "getUsage",
        "parameters": [
          {
            "in": "query",
            "name": "month",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "required": false,
            "schema": {
              "enum": [
                "json",
                "csv"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageReport"
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          }
        },
        "summary": "Monthly usage/billing report (TB, 95th percentile, attacks); the tenant role sees only itself",
        "tags": [
          "Account \u0026 usage"
        ],
        "x-required-permission": "usage:read"
      }
    },
    "/v1/whoami": {
      "get": {
        "operationId": "getWhoami",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                }
              }
            },
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Forbidden: missing permission, another customer's resource, or a read-only token used for a change"
          },
          "429": {
            "description": "Rate limited"
          }
        },
        "summary": "Caller identity",
        "tags": [
          "Authentication"
        ]
      }
    }
  },
  "security": [
    {
      "bearer": []
    }
  ],
  "servers": [
    {
      "url": "https://portal.wireshield.network"
    }
  ],
  "tags": [
    {
      "description": "API tokens of the signed-in user. Tokens are created and revoked in the panel (user menu → API tokens).",
      "name": "Authentication"
    },
    {
      "description": "Dashboard summary and attack (incident) records.",
      "name": "Overview \u0026 attacks"
    },
    {
      "description": "Protected prefixes, their protection mode, live attack state and counters.",
      "name": "Prefixes \u0026 attacks"
    },
    {
      "description": "Sampled traffic: time series, top talkers and host statistics.",
      "name": "Traffic"
    },
    {
      "description": "Packet samples and flows recorded during attacks; packet captures (PCAP).",
      "name": "Forensics"
    },
    {
      "description": "Server-Sent Events stream for attack and state changes.",
      "name": "Live events"
    },
    {
      "description": "The customer's protection summary and its own e-mail notification settings.",
      "name": "Customer account"
    },
    {
      "description": "Learned normal-traffic baselines used for detection.",
      "name": "Baseline learning"
    },
    {
      "description": "Per-prefix source allow/deny lists.",
      "name": "Allow \u0026 deny lists"
    },
    {
      "description": "Per-prefix custom filtering rules.",
      "name": "Custom rules"
    },
    {
      "description": "RTBH / FlowSpec announcements to upstream routers.",
      "name": "Upstream mitigation"
    },
    {
      "description": "GRE tunnels used to return clean traffic.",
      "name": "GRE tunnels"
    },
    {
      "description": "BGP sessions and announced prefixes.",
      "name": "BGP"
    },
    {
      "description": "Attack and periodic reports (PDF).",
      "name": "Reports"
    },
    {
      "description": "Customers and traffic usage for billing.",
      "name": "Account \u0026 usage"
    },
    {
      "description": "Country / ASN lookup.",
      "name": "GeoIP"
    },
    {
      "description": "Appliance health, interfaces, license and metrics.",
      "name": "System"
    }
  ]
}
