Scans

Start a vulnerability scan for one device or all, follow its progress, cancel it, and scan history.

MethodPathSummary
POST/api/scanStart a scan
GET/api/scan/statusLive progress for the header bar
POST/api/scan/cancelCancel the running scan (or one specific run)
GET/api/scansScan history (Activity → Scans)

#Start a scan

POST/api/scan
Address
https://<your-org>.brambleit.cloud/warden/api/scan
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.

Request body JSON

NameTypeDescription
device_idstringScan only this device; leave out to scan everything in scope.

Response 202

FieldTypeDescription
messagestring
Example response
JSON
{
  "message": "Saved"
}

Errors

StatusMessage
409A scan is already running
404Device not found

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/scan', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"device_id":"string"}),
});
const data = await res.json();

#Live progress for the header bar

GET/api/scan/status

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.

Address
https://<your-org>.brambleit.cloud/warden/api/scan/status
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.

Response 200

FieldTypeDescription
scanningboolean
runobject, or null
eta_sarray of any
per_device_sarray of any
Example response
JSON
{
  "scanning": false,
  "run": {},
  "eta_s": [],
  "per_device_s": []
}

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/scan/status', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#Cancel the running scan (or one specific run)

POST/api/scan/cancel
Address
https://<your-org>.brambleit.cloud/warden/api/scan/cancel
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.

Request body JSON

NameTypeDescription
run_idnumber

Response 200

FieldTypeDescription
messagestring
cancelledinteger
Example response
JSON
{
  "message": "Saved",
  "cancelled": 1
}

Errors

StatusMessage
409No scan is running

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/scan/cancel', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"run_id":12.5}),
});
const data = await res.json();

#Scan history (Activity → Scans)

GET/api/scans
Address
https://<your-org>.brambleit.cloud/warden/api/scans
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.

Query parameters

NameTypeDescription
limitinteger

Response 200

FieldTypeDescription
runsarray of object
runs[].device_nameinteger, or null
statsarray of any
Example response
JSON
{
  "runs": [
    {
      "device_name": 1
    }
  ],
  "stats": []
}

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/scans', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();