{
 "openapi": "3.0.3",
 "info": {
  "title": "Bramble Warden API",
  "version": "2026-11-13",
  "description": "Bramble Warden is RMM's security add-on: vulnerabilities on every device, patching (OS, applications and containers), hardening baselines, Cyber Essentials remediation, urgent advisories, Active Directory and Group Policy, customer security audits, and the SIEM (Logs & auditing). Warden's settings are in the [Admin Centre API](/apps/admin/api/warden).\n"
 },
 "servers": [
  {
   "url": "https://{org}.brambleit.cloud/warden",
   "variables": {
    "org": {
     "default": "your-org"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "apiKey": {
    "type": "apiKey",
    "in": "header",
    "name": "X-API-Key"
   },
   "session": {
    "type": "apiKey",
    "in": "cookie",
    "name": "sso_session"
   },
   "bearer": {
    "type": "http",
    "scheme": "bearer",
    "bearerFormat": "JWT"
   }
  }
 },
 "tags": [
  {
   "name": "Overview",
   "description": "The dashboard numbers, who you are and what you can do, lookup lists for filters, and recent activity."
  },
  {
   "name": "Vulnerabilities & findings",
   "description": "Vulnerable packages across the fleet (one row per package) and the individual findings (package × device × CVE). Mark findings accepted or false positive.\n"
  },
  {
   "name": "Devices",
   "description": "Warden's view of each device, excluding a device from checks, and rebooting it."
  },
  {
   "name": "Scans",
   "description": "Start a vulnerability scan for one device or all, follow its progress, cancel it, and scan history."
  },
  {
   "name": "Patching",
   "description": "Pending updates; patch jobs (security only, everything, chosen packages, or apps); patch **policies** that run on a schedule within a maintenance window; approvals for policies that need them; removing a package; OS release upgrades; and Windows Update profiles (categories, feature upgrades).\n"
  },
  {
   "name": "Applications",
   "description": "Outdated applications across the fleet and the full application inventory."
  },
  {
   "name": "Containers",
   "description": "Docker images on devices, their vulnerabilities, and starting, stopping, restarting or updating containers."
  },
  {
   "name": "Urgent alerts",
   "description": "Critical advisories and newly exploited CVEs that affect your devices, public notices from national security centres, and alerts you add yourself from a link.\n"
  },
  {
   "name": "Cyber Essentials",
   "description": "Cyber Essentials checks and remediation. A **plan** lists the fixes for chosen devices; you approve it, Warden applies it, and each item can be undone. Items that need a person can be marked done or dismissed.\n"
  },
  {
   "name": "Hardening",
   "description": "Hardening baselines for Windows and Linux: a policy of rules per device type, results per device, planning and applying fixes (with undo), exceptions, and the standard as a Group Policy script for domain admins.\n"
  },
  {
   "name": "Active Directory & Group Policy",
   "description": "Domain controllers enrolled in RMM: Group Policy objects and required settings, changes made through Warden (with undo), and running `gpupdate` on devices. Needs `warden.directory.manage`.\n"
  },
  {
   "name": "Network devices",
   "description": "Hosts found by RMM network probes with their findings, and network kit (UniFi) from connectors: polling and firmware upgrades.\n"
  },
  {
   "name": "Agent updates",
   "description": "Managed Bramble agent updates — the update window and running updates now."
  },
  {
   "name": "PSA tickets",
   "description": "Tickets Warden has raised in PSA for findings, and raising one by hand."
  },
  {
   "name": "Logs & auditing (SIEM)",
   "description": "Security events collected from Windows and Linux devices: collection status, a summary, searching events, and one event in full.\n"
  },
  {
   "name": "Security audits",
   "description": "Customer security audits: a questionnaire with answers filled in from device data where Warden can, completed by hand where it can't, and a branded report.\n"
  }
 ],
 "paths": {
  "/api/me": {
   "get": {
    "tags": [
     "Overview"
    ],
    "summary": "Who you are: the signed-in person and what they can do here",
    "operationId": "get-api-me",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "user": {},
          "patching_min_agent": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/overview": {
   "get": {
    "tags": [
     "Overview"
    ],
    "summary": "Dashboard numbers",
    "operationId": "get-api-overview",
    "description": "Issues, CVEs and devices by severity and fix state, compliance, OS mix and end-of-life, the worst devices and packages, trends, patching, policies, recent activity and open tickets.\n\n\nRequires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "issues": {
           "type": "array",
           "items": {}
          },
          "cves": {
           "type": "object",
           "properties": {
            "cves": {
             "type": "integer"
            },
            "packages": {
             "type": "integer"
            },
            "devices": {
             "type": "integer"
            },
            "kev_cves": {
             "type": "integer"
            },
            "oldest": {
             "type": "string",
             "format": "date-time"
            }
           }
          },
          "devices": {
           "type": "object",
           "properties": {
            "total": {
             "type": "integer"
            },
            "supported": {
             "type": "number"
            },
            "limited_": {
             "type": "number"
            },
            "reboot": {
             "type": "number"
            },
            "pending_updates": {
             "type": "number"
            },
            "high_risk": {
             "type": "number"
            },
            "avg_risk": {
             "type": "number"
            },
            "last_scan": {
             "type": "string",
             "format": "date-time",
             "nullable": true
            }
           }
          },
          "compliance": {},
          "osMix": {},
          "osLife": {},
          "topDevices": {
           "type": "array",
           "items": {}
          },
          "topPackages": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "package": {
              "type": "string"
             },
             "devices": {
              "type": "integer"
             },
             "cves": {
              "type": "integer"
             },
             "kev": {
              "type": "boolean"
             },
             "worst": {
              "type": "string"
             },
             "best_fix": {},
             "fix": {}
            }
           }
          },
          "trend": {
           "type": "array",
           "items": {}
          },
          "patch": {},
          "policies": {
           "type": "array",
           "items": {}
          },
          "activity": {},
          "openTickets": {
           "type": "number"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/vulnerabilities": {
   "get": {
    "tags": [
     "Vulnerabilities & findings"
    ],
    "summary": "List vulnerable packages",
    "operationId": "get-api-vulnerabilities",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "status",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "open",
        "accepted",
        "false_positive",
        "resolved"
       ]
      },
      "description": "`open`, `accepted` or `false_positive`."
     },
     {
      "name": "severity",
      "in": "query",
      "required": false,
      "schema": {},
      "description": "`critical`, `high`, `medium` or `low`."
     },
     {
      "name": "fix_state",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "installable",
        "reboot",
        "awaiting",
        "released",
        "manual",
        "none"
       ]
      },
      "description": "`installable`, `reboot`, `awaiting`, `released`, `manual` or `none`."
     },
     {
      "name": "kev",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "`1` for only CVEs known to be exploited (CISA KEV)."
     },
     {
      "name": "device_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "Only this device."
     },
     {
      "name": "package",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "Only this package."
     },
     {
      "name": "search",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "Text to search for."
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "packages": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "package": {
              "type": "string"
             },
             "devices": {
              "type": "integer"
             },
             "cves": {
              "type": "integer"
             },
             "findings": {
              "type": "integer"
             },
             "worst": {},
             "kev": {
              "type": "boolean"
             },
             "epss": {
              "type": "number",
              "nullable": true
             },
             "cvss": {
              "type": "number",
              "nullable": true
             },
             "installable": {
              "type": "number"
             },
             "reboot": {
              "type": "number"
             },
             "awaiting": {
              "type": "number"
             },
             "released": {
              "type": "number"
             },
             "manual": {
              "type": "number"
             },
             "fixed_version": {
              "type": "string",
              "nullable": true
             },
             "first_seen": {
              "type": "string",
              "format": "date-time"
             },
             "critical": {
              "type": "number"
             },
             "high": {
              "type": "number"
             },
             "medium": {
              "type": "number"
             },
             "low": {
              "type": "number"
             },
             "ticketed": {
              "type": "number"
             },
             "oldest_published": {}
            }
           }
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/vulnerabilities/{package}": {
   "get": {
    "tags": [
     "Vulnerabilities & findings"
    ],
    "summary": "One package's findings across devices",
    "operationId": "get-api-vulnerabilities-package",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "package",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "package": {},
          "cves": {
           "type": "array",
           "items": {}
          },
          "devices": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/findings": {
   "get": {
    "tags": [
     "Vulnerabilities & findings"
    ],
    "summary": "List findings",
    "operationId": "get-api-findings",
    "description": "Individual findings (package, device, CVE). Takes the same filters as the vulnerabilities list.\n\nRequires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "status",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "open",
        "accepted",
        "false_positive",
        "resolved"
       ]
      }
     },
     {
      "name": "severity",
      "in": "query",
      "required": false,
      "schema": {}
     },
     {
      "name": "fix_state",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "installable",
        "reboot",
        "awaiting",
        "released",
        "manual",
        "none"
       ]
      }
     },
     {
      "name": "kev",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "device_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "package",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "search",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "findings": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "integer"
             },
             "tenant_id": {
              "type": "integer"
             },
             "device_id": {
              "type": "string"
             },
             "package": {
              "type": "string"
             },
             "binaries": {
              "type": "string",
              "nullable": true
             },
             "installed_version": {
              "type": "string",
              "nullable": true
             },
             "fixed_version": {
              "type": "string",
              "nullable": true
             },
             "fix_state": {
              "type": "string",
              "enum": [
               "installable",
               "reboot",
               "awaiting",
               "released",
               "manual",
               "none"
              ]
             },
             "vuln_id": {
              "type": "string"
             },
             "cve_id": {
              "type": "string"
             },
             "severity": {
              "type": "string",
              "enum": [
               "critical",
               "high",
               "medium",
               "low",
               "none"
              ]
             },
             "distro_priority": {
              "type": "string",
              "nullable": true
             },
             "cvss_score": {
              "type": "number",
              "nullable": true
             },
             "kev": {
              "type": "boolean"
             },
             "epss": {
              "type": "number",
              "nullable": true
             },
             "status": {
              "type": "string",
              "enum": [
               "open",
               "resolved",
               "accepted",
               "false_positive"
              ]
             },
             "status_note": {
              "type": "string",
              "nullable": true
             },
             "status_by": {
              "type": "string",
              "nullable": true
             },
             "status_at": {
              "type": "string",
              "format": "date-time",
              "nullable": true
             },
             "first_seen": {
              "type": "string",
              "format": "date-time"
             },
             "last_seen": {
              "type": "string",
              "format": "date-time"
             },
             "resolved_at": {
              "type": "string",
              "format": "date-time",
              "nullable": true
             },
             "ticket_link_id": {
              "type": "integer",
              "nullable": true
             },
             "summary": {}
            }
           }
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/findings/status": {
   "post": {
    "tags": [
     "Vulnerabilities & findings"
    ],
    "summary": "Accept or dismiss findings",
    "operationId": "post-api-findings-status",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "updated": {
           "type": "integer"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ids": {
          "type": "array",
          "items": {},
          "description": "Finding ids."
         },
         "status": {
          "type": "string",
          "enum": [
           "open",
           "accepted",
           "false_positive"
          ],
          "description": "`open`, `accepted` (a known, accepted risk) or `false_positive`."
         },
         "note": {
          "type": "string",
          "description": "Why."
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/devices": {
   "get": {
    "tags": [
     "Devices"
    ],
    "summary": "List devices with their issues",
    "operationId": "get-api-devices",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "devices": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/devices/{id}": {
   "get": {
    "tags": [
     "Devices"
    ],
    "summary": "A device's findings, updates and history",
    "operationId": "get-api-devices-id",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "device": {
           "type": "object",
           "properties": {
            "inventory_hash": {},
            "patch_capable": {
             "type": "boolean"
            },
            "excluded": {
             "type": "object",
             "nullable": true,
             "properties": {
              "reason": {
               "type": "string"
              },
              "by": {},
              "at": {
               "type": "string",
               "format": "date-time"
              }
             }
            }
           }
          },
          "findings": {
           "type": "array",
           "items": {}
          },
          "updates": {
           "type": "array",
           "items": {}
          },
          "history": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "integer"
             },
             "job_id": {
              "type": "integer"
             },
             "job_name": {
              "type": "string"
             },
             "status": {
              "type": "string",
              "enum": [
               "pending",
               "dispatched",
               "succeeded",
               "failed",
               "skipped",
               "cancelled"
              ]
             },
             "message": {
              "type": "string",
              "nullable": true
             },
             "dispatched_at": {
              "type": "string",
              "format": "date-time",
              "nullable": true
             },
             "finished_at": {
              "type": "string",
              "format": "date-time",
              "nullable": true
             },
             "rebooted": {
              "type": "boolean"
             },
             "reboot_required": {
              "type": "boolean",
              "nullable": true
             },
             "packages_json": {
              "type": "string",
              "nullable": true
             },
             "result_json": {
              "type": "string",
              "nullable": true
             },
             "packages": {
              "type": "array",
              "items": {}
             },
             "result": {}
            }
           }
          },
          "tickets": {
           "type": "array",
           "items": {}
          },
          "resolved30d": {
           "type": "integer"
          },
          "removals": {
           "type": "array",
           "items": {}
          },
          "upgrades": {
           "type": "array",
           "items": {}
          },
          "lifecycle": {}
         }
        }
       }
      }
     },
     "404": {
      "description": "Device not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/scan": {
   "post": {
    "tags": [
     "Scans"
    ],
    "summary": "Start a scan",
    "operationId": "post-api-scan",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "202": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Device not found"
     },
     "409": {
      "description": "A scan is already running"
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "device_id": {
          "type": "string",
          "description": "Scan only this device; leave out to scan everything in scope."
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/scan/status": {
   "get": {
    "tags": [
     "Scans"
    ],
    "summary": "Live progress for the header bar",
    "operationId": "get-api-scan-status",
    "description": "Live progress for the header bar. ETA = time per device so far in this run; before the first device finishes, the average of recent completed runs (per device) stands in.\n\nRequires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "scanning": {
           "type": "boolean"
          },
          "run": {
           "type": "object",
           "nullable": true
          },
          "eta_s": {
           "type": "array",
           "items": {}
          },
          "per_device_s": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/scan/cancel": {
   "post": {
    "tags": [
     "Scans"
    ],
    "summary": "Cancel the running scan (or one specific run)",
    "operationId": "post-api-scan-cancel",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          },
          "cancelled": {
           "type": "integer"
          }
         }
        }
       }
      }
     },
     "409": {
      "description": "No scan is running"
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "run_id": {
          "type": "number"
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/scans": {
   "get": {
    "tags": [
     "Scans"
    ],
    "summary": "Scan history (Activity → Scans)",
    "operationId": "get-api-scans",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "runs": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "device_name": {
              "type": "integer",
              "nullable": true
             }
            }
           }
          },
          "stats": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/updates": {
   "get": {
    "tags": [
     "Patching"
    ],
    "summary": "Pending updates across devices",
    "operationId": "get-api-updates",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "updates": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "package": {
              "type": "string"
             },
             "title": {
              "type": "string",
              "nullable": true
             },
             "candidate_version": {
              "type": "string",
              "nullable": true
             },
             "devices": {
              "type": "integer"
             },
             "is_security": {
              "type": "boolean"
             },
             "fixes_findings": {
              "type": "number"
             },
             "severity": {
              "type": "string",
              "nullable": true
             },
             "origins": {
              "type": "string"
             },
             "kind": {
              "type": "string"
             },
             "category": {
              "type": "string",
              "nullable": true
             },
             "approval": {}
            }
           }
          },
          "approvals": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/apps": {
   "get": {
    "tags": [
     "Applications"
    ],
    "summary": "Application patching: outdated apps across the fleet, one row per app",
    "operationId": "get-api-apps",
    "description": "Application patching: outdated apps across the fleet, one row per app. Apps are kind 'app' updates (winget/<id>, snap/<n>, flatpak/<id>) plus apt/dnf packages that RMM's application catalogue deploys. Each row lists its devices so \"Update everywhere\" can make a selected job, and says which catalogue app (if any) it belongs to.\n\nRequires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "apps": {
           "type": "array",
           "items": {}
          },
          "manual": {
           "type": "array",
           "items": {}
          },
          "coverage": {},
          "summary": {
           "type": "object",
           "properties": {
            "apps": {
             "type": "integer"
            },
            "devices": {
             "type": "integer"
            },
            "updates": {
             "type": "integer"
            }
           }
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/apps/inventory": {
   "get": {
    "tags": [
     "Applications"
    ],
    "summary": "Application inventory: every app found on devices (device_apps, built by the scanner from each device's report), one row per app, with how many devices have …",
    "operationId": "get-api-apps-inventory",
    "description": "Application inventory: every app found on devices (device_apps, built by the scanner from each device's report), one row per app, with how many devices have it, which versions, and how many are behind.\n\nRequires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "apps": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "app_key": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "publisher": {
              "type": "string",
              "nullable": true
             },
             "sources": {
              "type": "array",
              "items": {}
             },
             "devices": {
              "type": "integer"
             },
             "outdated": {
              "type": "integer"
             },
             "patchable": {
              "type": "integer"
             },
             "unknown": {
              "type": "integer"
             },
             "latest": {
              "type": "string",
              "nullable": true
             },
             "version_count": {
              "type": "integer"
             },
             "versions": {
              "type": "array",
              "items": {}
             },
             "store": {
              "type": "boolean"
             }
            }
           }
          },
          "summary": {
           "type": "object",
           "properties": {
            "apps": {
             "type": "integer"
            },
            "outdated_apps": {
             "type": "integer"
            },
            "devices": {
             "type": "number"
            },
            "devices_outdated": {
             "type": "number"
            }
           }
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/apps/inventory/devices": {
   "get": {
    "tags": [
     "Applications"
    ],
    "summary": "Devices that have an app",
    "operationId": "get-api-apps-inventory-devices",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "key",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "The app (from the inventory list)."
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "devices": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "device_id": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "version": {
              "type": "string",
              "nullable": true
             },
             "latest_version": {
              "type": "string",
              "nullable": true
             },
             "status": {
              "type": "string"
             },
             "patchable": {
              "type": "boolean"
             },
             "update_package": {
              "type": "string",
              "nullable": true
             },
             "scope": {
              "type": "string",
              "nullable": true
             },
             "source": {
              "type": "string"
             },
             "device_name": {
              "type": "integer"
             },
             "online": {
              "type": "boolean"
             },
             "site_name": {}
            }
           }
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/approvals": {
   "post": {
    "tags": [
     "Patching"
    ],
    "summary": "Approve or reject updates waiting for approval",
    "operationId": "post-api-approvals",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "updated": {
           "type": "integer"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "items": {
          "type": "array",
          "items": {}
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/jobs": {
   "get": {
    "tags": [
     "Patching"
    ],
    "summary": "List patch jobs",
    "operationId": "get-api-jobs",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "jobs": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   },
   "post": {
    "tags": [
     "Patching"
    ],
    "summary": "Start a patch job",
    "operationId": "post-api-jobs",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "201": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "update_class": {
          "type": "string",
          "enum": [
           "security",
           "all",
           "selected",
           "apps"
          ],
          "description": "`security` (security updates only), `all`, `selected` (just `packages`) or `apps`."
         },
         "reboot_policy": {
          "type": "string",
          "enum": [
           "never",
           "if_required",
           "always"
          ],
          "description": "`never`, `if_required` or `always`."
         },
         "device_ids": {
          "type": "array",
          "items": {},
          "description": "Devices to patch."
         },
         "packages": {
          "type": "array",
          "items": {},
          "description": "Package names, with `update_class: selected`."
         },
         "name": {
          "type": "string",
          "description": "A name for the job."
         },
         "include_apps": {
          "type": "boolean",
          "description": "Also update applications."
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/jobs/{id}": {
   "get": {
    "tags": [
     "Patching"
    ],
    "summary": "Get a patch job with per-device results",
    "operationId": "get-api-jobs-id",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "job": {},
          "devices": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "integer"
             },
             "online": {
              "type": "boolean"
             },
             "packages": {
              "type": "array",
              "items": {}
             },
             "result": {},
             "result_json": {}
            }
           }
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Job not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/patch/bulk": {
   "post": {
    "tags": [
     "Patching"
    ],
    "summary": "Patch everything that needs it",
    "operationId": "post-api-patch-bulk",
    "description": "Fixes chosen vulnerable packages and updates on every in-scope device that needs them. `dry_run` shows what would happen.\n\nRequires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "devices": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "device_id": {
              "type": "integer"
             },
             "name": {
              "type": "integer"
             },
             "online": {
              "type": "boolean"
             },
             "packages": {
              "type": "array",
              "items": {}
             }
            }
           }
          },
          "packages": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     },
     "201": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "vuln_packages": {
          "type": "array",
          "items": {}
         },
         "update_packages": {
          "type": "array",
          "items": {}
         },
         "dry_run": {},
         "reboot_policy": {
          "type": "string",
          "enum": [
           "never",
           "if_required",
           "always"
          ]
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/jobs/{id}/cancel": {
   "post": {
    "tags": [
     "Patching"
    ],
    "summary": "Cancel a patch job",
    "operationId": "post-api-jobs-id-cancel",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "409": {
      "description": "Job is not running"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/policies": {
   "get": {
    "tags": [
     "Patching"
    ],
    "summary": "List patch policies",
    "operationId": "get-api-policies",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "policies": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "scope_ids": {
              "type": "array",
              "items": {}
             },
             "open_now": {
              "type": "boolean"
             }
            }
           }
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   },
   "post": {
    "tags": [
     "Patching"
    ],
    "summary": "Create a patch policy",
    "operationId": "post-api-policies",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "201": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "integer"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "schedule_days": {
          "type": "array",
          "items": {},
          "description": "Days of the week to run."
         },
         "window_start": {
          "description": "When the maintenance window opens, `HH:MM`."
         },
         "timezone": {
          "description": "The window's time zone, e.g. `Europe/London`."
         },
         "name": {
          "type": "string",
          "description": "The policy's name."
         },
         "enabled": {
          "type": "boolean",
          "description": "Whether it runs."
         },
         "scope_type": {
          "type": "string",
          "enum": [
           "all",
           "site",
           "group",
           "device"
          ],
          "description": "`all`, `site`, `group` or `device`."
         },
         "scope_ids": {
          "type": "array",
          "items": {},
          "description": "The sites, groups or devices (unless `all`)."
         },
         "update_class": {
          "type": "string",
          "enum": [
           "all",
           "apps"
          ],
          "description": "`all` (OS updates) or `apps`."
         },
         "include_apps": {
          "type": "array",
          "items": {},
          "description": "Also update applications."
         },
         "windows_categories": {
          "type": "array",
          "items": {},
          "description": "Windows Update categories to include."
         },
         "approval_mode": {
          "type": "string",
          "description": "Whether updates need approving first."
         },
         "window_minutes": {
          "type": "integer",
          "description": "How long the window lasts."
         },
         "reboot_policy": {
          "type": "string",
          "enum": [
           "never",
           "if_required",
           "always"
          ],
          "description": "`never`, `if_required` or `always`."
         },
         "exclude_packages": {
          "type": "array",
          "items": {},
          "description": "Packages never to update."
         },
         "pre_script_id": {
          "type": "number",
          "description": "An RMM script to run before patching."
         },
         "post_script_id": {
          "type": "number",
          "description": "An RMM script to run after patching."
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/policies/{id}": {
   "put": {
    "tags": [
     "Patching"
    ],
    "summary": "Update a patch policy",
    "operationId": "put-api-policies-id",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Policy not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "schedule_days": {
          "type": "array",
          "items": {}
         },
         "window_start": {},
         "timezone": {},
         "name": {
          "type": "string"
         },
         "enabled": {
          "type": "boolean"
         },
         "scope_type": {
          "type": "string",
          "enum": [
           "all",
           "site",
           "group",
           "device"
          ]
         },
         "scope_ids": {
          "type": "array",
          "items": {}
         },
         "update_class": {
          "type": "string",
          "enum": [
           "all",
           "apps"
          ]
         },
         "include_apps": {
          "type": "array",
          "items": {}
         },
         "windows_categories": {
          "type": "array",
          "items": {}
         },
         "approval_mode": {
          "type": "string"
         },
         "window_minutes": {
          "type": "integer"
         },
         "reboot_policy": {
          "type": "string",
          "enum": [
           "never",
           "if_required",
           "always"
          ]
         },
         "exclude_packages": {
          "type": "array",
          "items": {}
         },
         "pre_script_id": {
          "type": "number"
         },
         "post_script_id": {
          "type": "number"
         }
        }
       }
      }
     }
    }
   },
   "delete": {
    "tags": [
     "Patching"
    ],
    "summary": "Delete a patch policy",
    "operationId": "delete-api-policies-id",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Policy not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/policies/{id}/run": {
   "post": {
    "tags": [
     "Patching"
    ],
    "summary": "Run a patch policy now",
    "operationId": "post-api-policies-id-run",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "201": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "404": {
      "description": "Policy not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/removals": {
   "post": {
    "tags": [
     "Patching"
    ],
    "summary": "Plan removing a package",
    "operationId": "post-api-removals",
    "description": "Works out what removing a package would also remove, for you to confirm.\n\nRequires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "201": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "results": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "package": {
          "description": "The package."
         },
         "device_ids": {
          "type": "array",
          "items": {},
          "description": "The devices."
         },
         "device_id": {
          "type": "integer"
         }
        }
       }
      }
     }
    }
   },
   "get": {
    "tags": [
     "Patching"
    ],
    "summary": "List package removals",
    "operationId": "get-api-removals",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "ids",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "device_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "package",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "removals": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/removals/{id}/confirm": {
   "post": {
    "tags": [
     "Patching"
    ],
    "summary": "Confirm a package removal",
    "operationId": "post-api-removals-id-confirm",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Removal not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "accept_extra": {
          "description": "Also remove the other packages that depend on it."
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/removals/{id}/cancel": {
   "post": {
    "tags": [
     "Patching"
    ],
    "summary": "Cancel a package removal",
    "operationId": "post-api-removals-id-cancel",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "409": {
      "description": "This removal can no longer be cancelled"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/os-upgrades": {
   "post": {
    "tags": [
     "Patching"
    ],
    "summary": "Plan an OS release upgrade",
    "operationId": "post-api-os-upgrades",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "201": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "err.status || 400": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "device_id": {
          "type": "integer",
          "description": "The device."
         }
        }
       }
      }
     }
    }
   },
   "get": {
    "tags": [
     "Patching"
    ],
    "summary": "List OS upgrades",
    "operationId": "get-api-os-upgrades",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "ids",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "device_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "upgrades": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/os-upgrades/{id}/confirm": {
   "post": {
    "tags": [
     "Patching"
    ],
    "summary": "Confirm an OS upgrade",
    "operationId": "post-api-os-upgrades-id-confirm",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Upgrade not found"
     },
     "err.status || 400": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "confirm_name": {
          "type": "string",
          "description": "The device's name, typed to confirm."
         },
         "reboot": {
          "description": "Reboot when done."
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/devices/{id}/reboot": {
   "post": {
    "tags": [
     "Devices"
    ],
    "summary": "Reboot a device now (clears the \"reboot pending\" upgrade blocker)",
    "operationId": "post-api-devices-id-reboot",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "202": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Device not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/devices/{id}/exclude": {
   "post": {
    "tags": [
     "Devices"
    ],
    "summary": "Exclude a device from Warden (\"don't check\"), or include it again",
    "operationId": "post-api-devices-id-exclude",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Device not found"
     },
     "409": {
      "description": "A scan is running. Try again when it finishes."
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "reason": {
          "type": "string"
         }
        }
       }
      }
     }
    }
   },
   "delete": {
    "tags": [
     "Devices"
    ],
    "summary": "Include an excluded device again",
    "operationId": "delete-api-devices-id-exclude",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Device not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/os-upgrades/{id}/output": {
   "get": {
    "tags": [
     "Patching"
    ],
    "summary": "What the device printed, plus its release upgrade logs once fetched",
    "operationId": "get-api-os-upgrades-id-output",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "output": {
           "type": "string"
          },
          "device_log": {
           "type": "string"
          },
          "log_fetched_at": {
           "type": "string",
           "format": "date-time"
          },
          "log_state": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Upgrade not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/os-upgrades/{id}/logs": {
   "post": {
    "tags": [
     "Patching"
    ],
    "summary": "Fetch an upgrade's logs from the device",
    "operationId": "post-api-os-upgrades-id-logs",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "404": {
      "description": "Upgrade not found"
     },
     "err.status || 400": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/os-upgrades/{id}/cancel": {
   "post": {
    "tags": [
     "Patching"
    ],
    "summary": "Cancel an OS upgrade",
    "operationId": "post-api-os-upgrades-id-cancel",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "409": {
      "description": "This upgrade can no longer be cancelled"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/tickets": {
   "get": {
    "tags": [
     "PSA tickets"
    ],
    "summary": "List Warden's PSA tickets",
    "operationId": "get-api-tickets",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "tickets": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "integer"
             },
             "tenant_id": {
              "type": "integer"
             },
             "device_id": {
              "type": "string"
             },
             "package": {
              "type": "string"
             },
             "psa_ticket_id": {
              "type": "integer"
             },
             "rule_id": {
              "type": "integer",
              "nullable": true
             },
             "created_by": {
              "type": "string",
              "nullable": true
             },
             "status": {
              "type": "string",
              "enum": [
               "open",
               "closed"
              ]
             },
             "created_at": {
              "type": "string",
              "format": "date-time",
              "nullable": true
             },
             "closed_at": {
              "type": "string",
              "format": "date-time",
              "nullable": true
             },
             "rule_name": {
              "type": "string"
             },
             "findings": {},
             "open_findings": {},
             "device_name": {
              "type": "integer"
             },
             "psa": {}
            }
           }
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   },
   "post": {
    "tags": [
     "PSA tickets"
    ],
    "summary": "Raise a PSA ticket for a finding",
    "operationId": "post-api-tickets",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "201": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "results": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "device_id": {
          "type": "integer"
         },
         "package": {
          "type": "string"
         },
         "device_ids": {
          "type": "array",
          "items": {}
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/network": {
   "get": {
    "tags": [
     "Network devices"
    ],
    "summary": "Scoped by the probe that saw a host: with a site/group picked, only that site's probes, their hosts and findings",
    "operationId": "get-api-network",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "enabled": {
           "type": "boolean"
          },
          "hour": {
           "type": "integer"
          },
          "probes": {
           "type": "array",
           "items": {}
          },
          "runs": {
           "type": "array",
           "items": {}
          },
          "hosts": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "integer"
             },
             "tenant_id": {
              "type": "integer"
             },
             "ip": {
              "type": "string"
             },
             "mac": {
              "type": "string",
              "nullable": true
             },
             "vendor": {
              "type": "string",
              "nullable": true
             },
             "hostname": {
              "type": "string",
              "nullable": true
             },
             "os_guess": {
              "type": "string",
              "nullable": true
             },
             "probe_device_id": {
              "type": "string",
              "nullable": true
             },
             "first_seen": {
              "type": "string",
              "format": "date-time",
              "nullable": true
             },
             "last_seen": {
              "type": "string",
              "format": "date-time",
              "nullable": true
             },
             "last_run_id": {
              "type": "integer",
              "nullable": true
             },
             "rmm": {},
             "services": {
              "type": "array",
              "items": {}
             },
             "findings": {
              "type": "integer"
             }
            }
           }
          },
          "findings": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "integer"
             },
             "tenant_id": {
              "type": "integer"
             },
             "ip": {
              "type": "string"
             },
             "port": {
              "type": "integer"
             },
             "check_key": {
              "type": "string"
             },
             "severity": {
              "type": "string",
              "enum": [
               "critical",
               "high",
               "medium",
               "low"
              ]
             },
             "title": {
              "type": "string"
             },
             "detail": {
              "type": "string",
              "nullable": true
             },
             "status": {
              "type": "string",
              "enum": [
               "open",
               "resolved",
               "accepted"
              ]
             },
             "status_note": {
              "type": "string",
              "nullable": true
             },
             "status_by": {
              "type": "string",
              "nullable": true
             },
             "first_seen": {
              "type": "string",
              "format": "date-time",
              "nullable": true
             },
             "last_seen": {
              "type": "string",
              "format": "date-time",
              "nullable": true
             },
             "resolved_at": {
              "type": "string",
              "format": "date-time",
              "nullable": true
             },
             "host": {}
            }
           }
          },
          "counts": {
           "type": "object",
           "properties": {
            "hosts": {
             "type": "integer"
            },
            "services": {
             "type": "integer"
            },
            "accepted": {
             "type": "integer"
            }
           }
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/network/scan": {
   "post": {
    "tags": [
     "Network devices"
    ],
    "summary": "Scan network hosts now",
    "operationId": "post-api-network-scan",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "201": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/network/findings/status": {
   "post": {
    "tags": [
     "Network devices"
    ],
    "summary": "Accept or dismiss network findings",
    "operationId": "post-api-network-findings-status",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "updated": {
           "type": "integer"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ids": {
          "type": "array",
          "items": {}
         },
         "status": {
          "type": "string"
         },
         "note": {
          "type": "string"
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/agent-updates": {
   "get": {
    "tags": [
     "Agent updates"
    ],
    "summary": "List agent updates",
    "operationId": "get-api-agent-updates",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/agent-updates/policy": {
   "put": {
    "tags": [
     "Agent updates"
    ],
    "summary": "Set the agent update window",
    "operationId": "put-api-agent-updates-policy",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "policy": {}
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "schedule_days": {
          "type": "integer",
          "description": "Days to update on."
         },
         "window_start": {
          "description": "When the window opens, `HH:MM`."
         },
         "window_minutes": {
          "type": "integer",
          "description": "How long it lasts."
         },
         "timezone": {
          "description": "Its time zone."
         },
         "max_parallel": {
          "type": "integer",
          "description": "How many devices at once."
         },
         "excluded_devices": {
          "type": "array",
          "items": {},
          "description": "Devices never to update."
         },
         "enabled": {
          "type": "boolean",
          "description": "Update agents automatically."
         },
         "update_rmm": {
          "description": "Update the RMM agent."
         },
         "update_remote": {
          "description": "Update the Remote agent."
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/agent-updates/run": {
   "post": {
    "tags": [
     "Agent updates"
    ],
    "summary": "Update agents now",
    "operationId": "post-api-agent-updates-run",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "201": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "queued": {
           "type": "integer"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "device_ids": {
          "type": "array",
          "items": {}
         },
         "component": {}
        }
       }
      }
     }
    }
   }
  },
  "/api/network/kit": {
   "get": {
    "tags": [
     "Network devices"
    ],
    "summary": "Connectors are set up in BRM-Admin → Warden → Network integrations",
    "operationId": "get-api-network-kit",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/network/kit/{id}/poll": {
   "post": {
    "tags": [
     "Network devices"
    ],
    "summary": "Refresh a network device now",
    "operationId": "post-api-network-kit-id-poll",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "202": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Integration not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/network/kit/upgrade": {
   "post": {
    "tags": [
     "Network devices"
    ],
    "summary": "Firmware upgrades: { connector_id, device_ids, when (ISO time, or empty for now) }",
    "operationId": "post-api-network-kit-upgrade",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "201": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "connector_id": {
          "type": "integer"
         },
         "device_ids": {
          "type": "array",
          "items": {}
         },
         "when": {}
        }
       }
      }
     }
    }
   }
  },
  "/api/network/kit/jobs/{id}": {
   "delete": {
    "tags": [
     "Network devices"
    ],
    "summary": "Cancel a firmware upgrade",
    "operationId": "delete-api-network-kit-jobs-id",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "409": {
      "description": "Only a scheduled upgrade that hasn't started can be cancelled"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/ce": {
   "get": {
    "tags": [
     "Cyber Essentials"
    ],
    "summary": "Cyber Essentials status",
    "operationId": "get-api-ce",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/wu": {
   "get": {
    "tags": [
     "Patching"
    ],
    "summary": "Windows Update profiles",
    "operationId": "get-api-wu",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "profiles": {
           "type": "array",
           "items": {}
          },
          "devices": {
           "type": "array",
           "items": {}
          },
          "targets": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/wu/profiles": {
   "post": {
    "tags": [
     "Patching"
    ],
    "summary": "Create a Windows Update profile",
    "operationId": "post-api-wu-profiles",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "201": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "integer"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/wu/profiles/{id}": {
   "put": {
    "tags": [
     "Patching"
    ],
    "summary": "Update a Windows Update profile",
    "operationId": "put-api-wu-profiles-id",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "integer"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   },
   "delete": {
    "tags": [
     "Patching"
    ],
    "summary": "Delete a Windows Update profile",
    "operationId": "delete-api-wu-profiles-id",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/remediation": {
   "get": {
    "tags": [
     "Cyber Essentials"
    ],
    "summary": "List remediation plans",
    "operationId": "get-api-remediation",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "plans": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   },
   "post": {
    "tags": [
     "Cyber Essentials"
    ],
    "summary": "Plan Cyber Essentials fixes",
    "operationId": "post-api-remediation",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "201": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "plan": {}
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "device_ids": {
          "type": "array",
          "items": {},
          "description": "The devices."
         },
         "controls": {
          "type": "array",
          "items": {},
          "description": "The Cyber Essentials controls to fix."
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/remediation/items": {
   "get": {
    "tags": [
     "Cyber Essentials"
    ],
    "summary": "Outstanding items across open plans (optionally ?control=firewall)",
    "operationId": "get-api-remediation-items",
    "description": "Outstanding items across open plans (optionally ?control=firewall). Before /:id.\n\nRequires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "control",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "items": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/remediation/{id}": {
   "get": {
    "tags": [
     "Cyber Essentials"
    ],
    "summary": "Get a remediation plan",
    "operationId": "get-api-remediation-id",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "plan": {
           "type": "object",
           "properties": {
            "items": {
             "type": "array",
             "items": {}
            }
           }
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Plan not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/remediation/items/{id}": {
   "patch": {
    "tags": [
     "Cyber Essentials"
    ],
    "summary": "Change a plan item",
    "operationId": "patch-api-remediation-items-id",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "selected": {
          "description": "Include it when the plan is applied."
         },
         "ports": {
          "type": "array",
          "items": {},
          "description": "For firewall items, the ports to allow."
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/remediation/{id}/approve": {
   "post": {
    "tags": [
     "Cyber Essentials"
    ],
    "summary": "Approve and apply a plan",
    "operationId": "post-api-remediation-id-approve",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/remediation/{id}/discard": {
   "post": {
    "tags": [
     "Cyber Essentials"
    ],
    "summary": "Discard a plan",
    "operationId": "post-api-remediation-id-discard",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/remediation/items/{id}/undo": {
   "post": {
    "tags": [
     "Cyber Essentials"
    ],
    "summary": "Undo an applied fix",
    "operationId": "post-api-remediation-items-id-undo",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/remediation/items/{id}/done": {
   "post": {
    "tags": [
     "Cyber Essentials"
    ],
    "summary": "Mark a manual item done",
    "operationId": "post-api-remediation-items-id-done",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/remediation/items/{id}/dismiss": {
   "post": {
    "tags": [
     "Cyber Essentials"
    ],
    "summary": "Dismiss an item",
    "operationId": "post-api-remediation-items-id-dismiss",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/remediation/{id}/apply": {
   "post": {
    "tags": [
     "Cyber Essentials"
    ],
    "summary": "Apply more of an approved plan: unticked items, or retry failed ones",
    "operationId": "post-api-remediation-id-apply",
    "description": "Apply more of an approved plan: unticked items, or retry failed ones. Body { item_ids: [] }.\n\nRequires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "item_ids": {
          "type": "array",
          "items": {}
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/remediation/{id}/close": {
   "post": {
    "tags": [
     "Cyber Essentials"
    ],
    "summary": "Close a plan",
    "operationId": "post-api-remediation-id-close",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/alerts": {
   "get": {
    "tags": [
     "Urgent alerts"
    ],
    "summary": "Critical advisories, newly exploited CVEs and people's own alerts, with where each device in scope stands: affected / possibly / patched / safe",
    "operationId": "get-api-alerts",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "alerts": {
           "type": "array",
           "items": {}
          },
          "feeds": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   },
   "post": {
    "tags": [
     "Urgent alerts"
    ],
    "summary": "Add an alert by hand",
    "operationId": "post-api-alerts",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "201": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "409": {
      "description": "Warden is already tracking this as \"…\""
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "force": {},
         "title": {
          "type": "string"
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/notices": {
   "get": {
    "tags": [
     "Urgent alerts"
    ],
    "summary": "Public notices (lib/notices.js): everything NCSC / CERT-EU published about vulnerabilities, with the alert each one raised or joined",
    "operationId": "get-api-notices",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "notices": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/alerts/{id}": {
   "get": {
    "tags": [
     "Urgent alerts"
    ],
    "summary": "Get an alert with affected devices",
    "operationId": "get-api-alerts-id",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "cves",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "404": {
      "description": "Alert not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   },
   "put": {
    "tags": [
     "Urgent alerts"
    ],
    "summary": "Update an alert",
    "operationId": "put-api-alerts-id",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Only alerts added here can be edited"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   },
   "delete": {
    "tags": [
     "Urgent alerts"
    ],
    "summary": "Delete an alert",
    "operationId": "delete-api-alerts-id",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Only alerts added here can be deleted"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/alerts/lookup": {
   "post": {
    "tags": [
     "Urgent alerts"
    ],
    "summary": "Reads a pasted link (NCSC / vendor notice) for the \"Track an alert\" form: its title, summary, CVE IDs and the distro advisories that cover them",
    "operationId": "post-api-alerts-lookup",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string"
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/alerts/{id}/dismiss": {
   "post": {
    "tags": [
     "Urgent alerts"
    ],
    "summary": "Archive or restore an alert",
    "operationId": "post-api-alerts-id-dismiss",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Alert not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "restore": {}
        }
       }
      }
     }
    }
   }
  },
  "/api/alerts/{id}/recheck": {
   "post": {
    "tags": [
     "Urgent alerts"
    ],
    "summary": "Check devices against an alert again",
    "operationId": "post-api-alerts-id-recheck",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "202": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "404": {
      "description": "Alert not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/alerts/{id}/containers/accept": {
   "post": {
    "tags": [
     "Urgent alerts"
    ],
    "summary": "A container image on one device: accept this alert's findings in it until a newer image is out ({ device_id, image_id, undo })",
    "operationId": "post-api-alerts-id-containers-accept",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          },
          "findings": {
           "type": "integer"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Alert not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "device_id": {
          "type": "integer"
         },
         "image_id": {
          "type": "integer"
         },
         "undo": {}
        }
       }
      }
     }
    }
   }
  },
  "/api/containers": {
   "get": {
    "tags": [
     "Containers"
    ],
    "summary": "Every Docker image on the devices in scope, its containers and findings, plus which Docker hosts don't report image packages yet (agent < 6.23.0)",
    "operationId": "get-api-containers",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "images": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {}
           }
          },
          "hosts": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {}
           }
          },
          "actions": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/containers/actions": {
   "post": {
    "tags": [
     "Containers"
    ],
    "summary": "Start / stop / restart / update containers (lib/containeractions.js)",
    "operationId": "post-api-containers-actions",
    "description": "Start / stop / restart / update containers (lib/containeractions.js). { action, targets: [{ device_id, containers: [name…] }] }, or for \"update all\": { action: 'update', all: true } = every container whose image has a newer one in its registry, on the devices in scope.\n\nRequires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "201": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "results": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "action": {
          "type": "string"
         },
         "targets": {
          "type": "array",
          "items": {}
         },
         "all": {}
        }
       }
      }
     }
    }
   }
  },
  "/api/containers/actions/{id}/output": {
   "get": {
    "tags": [
     "Containers"
    ],
    "summary": "Output of a container action",
    "operationId": "get-api-containers-actions-id-output",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "output": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/containers/{device}/{image}/findings": {
   "get": {
    "tags": [
     "Containers"
    ],
    "summary": "A container image's vulnerabilities",
    "operationId": "get-api-containers-device-image-findings",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "device",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "image",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "findings": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/settings": {
   "get": {
    "tags": [
     "Overview"
    ],
    "summary": "Warden settings (read-only)",
    "operationId": "get-api-settings",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "settings": {
           "type": "array",
           "items": {}
          },
          "site_customers": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "site_id": {
              "type": "integer"
             },
             "psa_customer_id": {
              "type": "integer"
             }
            }
           }
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/lookups": {
   "get": {
    "tags": [
     "Overview"
    ],
    "summary": "Lists for filters (sites, groups, packages…)",
    "operationId": "get-api-lookups",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "sites": {
           "type": "array",
           "items": {}
          },
          "groups": {
           "type": "array",
           "items": {}
          },
          "scripts": {
           "type": "array",
           "items": {}
          },
          "queues": {
           "type": "array",
           "items": {}
          },
          "customers": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/activity": {
   "get": {
    "tags": [
     "Overview"
    ],
    "summary": "Recent activity",
    "operationId": "get-api-activity",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "activity": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "integer"
             },
             "company_id": {
              "type": "integer"
             },
             "user_id": {
              "type": "integer",
              "nullable": true
             },
             "user_name": {
              "type": "string",
              "nullable": true
             },
             "action": {
              "type": "string"
             },
             "receipt_id": {
              "type": "integer",
              "nullable": true
             },
             "detail": {
              "type": "string",
              "nullable": true
             },
             "created_at": {
              "type": "string",
              "format": "date-time"
             },
             "tenant_id": {
              "type": "integer"
             },
             "kind": {
              "type": "string"
             },
             "message": {
              "type": "string"
             },
             "actor": {
              "type": "string",
              "nullable": true
             },
             "device_id": {
              "type": "string",
              "nullable": true
             },
             "meta_json": {
              "type": "string",
              "nullable": true
             }
            }
           }
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/siem/status": {
   "get": {
    "tags": [
     "Logs & auditing (SIEM)"
    ],
    "summary": "SIEM collection status",
    "operationId": "get-api-siem-status",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "configured": {},
          "enabled": {
           "type": "boolean"
          },
          "settings": {
           "type": "object",
           "properties": {
            "retention_days": {
             "type": "integer"
            },
            "process_creation": {
             "type": "boolean"
            },
            "powershell": {
             "type": "boolean"
            },
            "bramble_audit": {
             "type": "boolean"
            },
            "audit_policy": {
             "type": "boolean"
            }
           }
          },
          "storage_full_at": {
           "type": "string",
           "format": "date-time",
           "nullable": true
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/siem/summary": {
   "get": {
    "tags": [
     "Logs & auditing (SIEM)"
    ],
    "summary": "SIEM summary",
    "operationId": "get-api-siem-summary",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/siem/events": {
   "get": {
    "tags": [
     "Logs & auditing (SIEM)"
    ],
    "summary": "Search security events",
    "operationId": "get-api-siem-events",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "before",
      "in": "query",
      "required": false,
      "schema": {}
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/siem/event": {
   "get": {
    "tags": [
     "Logs & auditing (SIEM)"
    ],
    "summary": "Get one security event",
    "operationId": "get-api-siem-event",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "device_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer"
      }
     },
     {
      "name": "ts",
      "in": "query",
      "required": false,
      "schema": {
       "type": "array",
       "items": {}
      }
     },
     {
      "name": "channel",
      "in": "query",
      "required": false,
      "schema": {}
     },
     {
      "name": "record_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "404": {
      "description": "Not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/siem/devices": {
   "get": {
    "tags": [
     "Logs & auditing (SIEM)"
    ],
    "summary": "Every device in scope, with collection status and the audit policy state",
    "operationId": "get-api-siem-devices",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "devices": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "device_id": {
              "type": "integer"
             },
             "name": {
              "type": "string"
             },
             "os_type": {
              "type": "string"
             },
             "agent_version": {},
             "site_name": {
              "type": "string"
             },
             "online": {
              "type": "boolean"
             },
             "excluded": {
              "type": "boolean"
             }
            }
           }
          },
          "min_agent": {
           "type": "object",
           "properties": {
            "windows": {
             "type": "string"
            },
            "linux": {
             "type": "string"
            }
           }
          },
          "audit_subcategories": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "guid": {},
             "name": {
              "type": "string"
             },
             "success": {
              "type": "boolean"
             },
             "failure": {
              "type": "boolean"
             }
            }
           }
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/baseline": {
   "get": {
    "tags": [
     "Hardening"
    ],
    "summary": "Hardening overview",
    "operationId": "get-api-baseline",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "enabled": {
           "type": "boolean"
          },
          "can_manage": {
           "type": "boolean"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/baseline/enable": {
   "post": {
    "tags": [
     "Hardening"
    ],
    "summary": "Opt-in: Hardening checks run only for organisations that turned it on",
    "operationId": "post-api-baseline-enable",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden. Permission (any of): `warden.directory.manage`.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "enabled": {
           "type": "boolean"
          },
          "queued": {}
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "on": {}
        }
       }
      }
     }
    }
   }
  },
  "/api/baseline/policy": {
   "get": {
    "tags": [
     "Hardening"
    ],
    "summary": "The Hardening policy: which rules, per device type, and applying it to a domain as GPOs",
    "operationId": "get-api-baseline-policy",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "can_manage": {
           "type": "boolean"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   },
   "put": {
    "tags": [
     "Hardening"
    ],
    "summary": "Update the hardening policy",
    "operationId": "put-api-baseline-policy",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden. Permission (any of): `warden.directory.manage`.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/baseline/policy/apply": {
   "post": {
    "tags": [
     "Hardening"
    ],
    "summary": "Apply the hardening policy to a domain as Group Policy",
    "operationId": "post-api-baseline-policy-apply",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden. Permission (any of): `warden.directory.manage`.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "domain": {
          "type": "string"
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/baseline/policy/applies/{id}/undo": {
   "post": {
    "tags": [
     "Hardening"
    ],
    "summary": "Undo a Group Policy apply",
    "operationId": "post-api-baseline-policy-applies-id-undo",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden. Permission (any of): `warden.directory.manage`.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/baseline/platforms": {
   "get": {
    "tags": [
     "Hardening"
    ],
    "summary": "Hardening by platform",
    "operationId": "get-api-baseline-platforms",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "can_manage": {
           "type": "boolean"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/baseline/platforms/{os}": {
   "get": {
    "tags": [
     "Hardening"
    ],
    "summary": "One platform's rules and devices",
    "operationId": "get-api-baseline-platforms-os",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "os",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "can_manage": {
           "type": "boolean"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/baseline/rules/{id}": {
   "get": {
    "tags": [
     "Hardening"
    ],
    "summary": "Get a hardening rule",
    "operationId": "get-api-baseline-rules-id",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "can_manage": {
           "type": "boolean"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/baseline/policy/rules": {
   "post": {
    "tags": [
     "Hardening"
    ],
    "summary": "Add rules to the policy, or take them out, for some device types",
    "operationId": "post-api-baseline-policy-rules",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden. Permission (any of): `warden.directory.manage`.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "rule_ids": {
          "type": "array",
          "items": {}
         },
         "profiles": {
          "type": "array",
          "items": {}
         },
         "on": {
          "type": "boolean"
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/baseline/policy/apply-now": {
   "post": {
    "tags": [
     "Hardening"
    ],
    "summary": "Apply the policy now on one platform's devices outside a domain (Warden fixes them itself)",
    "operationId": "post-api-baseline-policy-apply-now",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden. Permission (any of): `warden.directory.manage`.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "400": {
      "description": "Choose Windows or Linux"
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "os": {
          "type": "string",
          "enum": [
           "windows",
           "linux"
          ]
         },
         "device_ids": {
          "type": "array",
          "items": {}
         },
         "profile": {
          "type": "string"
         },
         "rule_ids": {
          "type": "array",
          "items": {}
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/baseline/devices/{id}": {
   "get": {
    "tags": [
     "Hardening"
    ],
    "summary": "A device's hardening results",
    "operationId": "get-api-baseline-devices-id",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "404": {
      "description": "Not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/baseline/devices/{id}/type": {
   "put": {
    "tags": [
     "Hardening"
    ],
    "summary": "A Linux device's type (server / workstation) by hand, or null for detected",
    "operationId": "put-api-baseline-devices-id-type",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden. Permission (any of): `warden.directory.manage`.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "profile": {}
        }
       }
      }
     }
    }
   }
  },
  "/api/baseline/check": {
   "post": {
    "tags": [
     "Hardening"
    ],
    "summary": "Check devices against the baseline now",
    "operationId": "post-api-baseline-check",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "queued": {}
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "device_ids": {
          "type": "array",
          "items": {}
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/baseline/plan": {
   "post": {
    "tags": [
     "Hardening"
    ],
    "summary": "Plan hardening fixes",
    "operationId": "post-api-baseline-plan",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "device_ids": {
          "type": "array",
          "items": {}
         },
         "rule_ids": {
          "type": "array",
          "items": {}
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/baseline/apply": {
   "post": {
    "tags": [
     "Hardening"
    ],
    "summary": "Apply planned hardening fixes",
    "operationId": "post-api-baseline-apply",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "items": {
          "type": "array",
          "items": {}
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/baseline/undo": {
   "post": {
    "tags": [
     "Hardening"
    ],
    "summary": "Undo hardening fixes on a device",
    "operationId": "post-api-baseline-undo",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     },
     "404": {
      "description": "Not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "device_id": {
          "type": "integer"
         },
         "rule_ids": {
          "type": "array",
          "items": {}
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/baseline/standard": {
   "get": {
    "tags": [
     "Hardening"
    ],
    "summary": "The Hardening policy as a script a domain admin can run instead of Apply",
    "operationId": "get-api-baseline-standard",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "download",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "File, page or redirect"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/baseline/local-standard": {
   "get": {
    "tags": [
     "Hardening"
    ],
    "summary": "The standard on Windows devices outside a domain (applied by Warden)",
    "operationId": "get-api-baseline-local-standard",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   },
   "put": {
    "tags": [
     "Hardening"
    ],
    "summary": "Set the standard for devices outside a domain",
    "operationId": "put-api-baseline-local-standard",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden. Permission (any of): `warden.directory.manage`.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "os": {},
         "enabled": {
          "type": "boolean"
         },
         "scope_type": {
          "type": "string",
          "enum": [
           "all",
           "site",
           "group",
           "device"
          ]
         },
         "scope_ids": {
          "type": "array",
          "items": {}
         },
         "platforms": {
          "type": "array",
          "items": {}
         },
         "include_strict": {}
        }
       }
      }
     }
    }
   }
  },
  "/api/baseline/exceptions": {
   "put": {
    "tags": [
     "Hardening"
    ],
    "summary": "Add a hardening exception",
    "operationId": "put-api-baseline-exceptions",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Not found"
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "device_id": {
          "type": "string",
          "description": "The device."
         },
         "rule_id": {
          "type": "integer",
          "description": "The rule it's excused from."
         },
         "reason": {
          "type": "string",
          "description": "Why."
         }
        }
       }
      }
     }
    }
   },
   "delete": {
    "tags": [
     "Hardening"
    ],
    "summary": "Remove a hardening exception",
    "operationId": "delete-api-baseline-exceptions",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/gpo": {
   "get": {
    "tags": [
     "Active Directory & Group Policy"
    ],
    "summary": "Domains and Group Policy objects",
    "operationId": "get-api-gpo",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/gpo/changes": {
   "post": {
    "tags": [
     "Active Directory & Group Policy"
    ],
    "summary": "Changes in Active Directory / Group Policy (warden.directory.manage)",
    "operationId": "post-api-gpo-changes",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden. Permission (any of): `warden.directory.manage`.",
    "parameters": [],
    "responses": {
     "201": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "domain": {
          "type": "string"
         },
         "action": {},
         "params": {
          "type": "array",
          "items": {}
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/gpo/changes/{id}/undo": {
   "post": {
    "tags": [
     "Active Directory & Group Policy"
    ],
    "summary": "Undo a directory change",
    "operationId": "post-api-gpo-changes-id-undo",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden. Permission (any of): `warden.directory.manage`.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "201": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/gpo/refresh": {
   "post": {
    "tags": [
     "Active Directory & Group Policy"
    ],
    "summary": "Read Group Policy from the domain again",
    "operationId": "post-api-gpo-refresh",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "queued": {}
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/gpo/requirements": {
   "post": {
    "tags": [
     "Active Directory & Group Policy"
    ],
    "summary": "Require a GPO on devices",
    "operationId": "post-api-gpo-requirements",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "201": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "integer"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "domain": {
          "type": "string"
         },
         "gpo_guid": {},
         "targets": {
          "type": "array",
          "items": {}
         },
         "note": {
          "type": "string"
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/gpo/requirements/{id}": {
   "delete": {
    "tags": [
     "Active Directory & Group Policy"
    ],
    "summary": "Remove a GPO requirement",
    "operationId": "delete-api-gpo-requirements-id",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "message": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/gpo/gpupdate": {
   "post": {
    "tags": [
     "Active Directory & Group Policy"
    ],
    "summary": "Run gpupdate on devices",
    "operationId": "post-api-gpo-gpupdate",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "queued": {}
         }
        }
       }
      }
     },
     "400": {
      "description": "Choose devices"
     }
    },
    "security": [
     {
      "session": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "device_ids": {
          "type": "array",
          "items": {}
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/audits": {
   "get": {
    "tags": [
     "Security audits"
    ],
    "summary": "List security audits",
    "operationId": "get-api-audits",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "audits": {
           "type": "array",
           "items": {}
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   },
   "post": {
    "tags": [
     "Security audits"
    ],
    "summary": "Start a security audit",
    "operationId": "post-api-audits",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [],
    "responses": {
     "201": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "integer"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/audits/{id}": {
   "get": {
    "tags": [
     "Security audits"
    ],
    "summary": "Get an audit with its questions and answers",
    "operationId": "get-api-audits-id",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   },
   "put": {
    "tags": [
     "Security audits"
    ],
    "summary": "Update an audit",
    "operationId": "put-api-audits-id",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   },
   "delete": {
    "tags": [
     "Security audits"
    ],
    "summary": "Delete an audit",
    "operationId": "delete-api-audits-id",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         }
        }
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/audits/{id}/answers/{qid}": {
   "put": {
    "tags": [
     "Security audits"
    ],
    "summary": "Answer a question",
    "operationId": "put-api-audits-id-answers-qid",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     },
     {
      "name": "qid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/audits/{id}/refresh": {
   "post": {
    "tags": [
     "Security audits"
    ],
    "summary": "Fill in answers from device data again",
    "operationId": "post-api-audits-id-refresh",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/audits/{id}/complete": {
   "post": {
    "tags": [
     "Security audits"
    ],
    "summary": "Complete an audit",
    "operationId": "post-api-audits-id-complete",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/audits/{id}/reopen": {
   "post": {
    "tags": [
     "Security audits"
    ],
    "summary": "Reopen an audit",
    "operationId": "post-api-audits-id-reopen",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {}
       }
      }
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  },
  "/api/audits/{id}/report": {
   "get": {
    "tags": [
     "Security audits"
    ],
    "summary": "The customer report: a printable HTML page (Print → Save as PDF)",
    "operationId": "get-api-audits-id-report",
    "description": "Requires: Signed-in browser session (the `sso_session` / `session_id` cookies from Bramble sign-in). Licence: Warden.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "File, page or redirect"
     }
    },
    "security": [
     {
      "session": []
     }
    ]
   }
  }
 }
}