Containers

Docker images on devices, their vulnerabilities, and starting, stopping, restarting or updating containers.

MethodPathSummary
GET/api/containersEvery 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)
POST/api/containers/actionsStart / stop / restart / update containers (lib/containeractions.js)
GET/api/containers/actions/:id/outputOutput of a container action
GET/api/containers/:device/:image/findingsA container image's vulnerabilities

#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)

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

Response 200

FieldTypeDescription
imagesarray of object
hostsarray of object
actionsarray of any
Example response
JSON
{
  "images": [
    {
      "…i": "…",
      "…named(i.device_id)": "…"
    }
  ],
  "hosts": [
    {
      "…h": "…",
      "…named(h.device_id)": "…"
    }
  ],
  "actions": []
}

Example request

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

#Start / stop / restart / update containers (lib/containeractions.js)

POST/api/containers/actions

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.

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

Request body JSON

NameTypeDescription
actionstring
targetsarray of any
allany

Response 201

FieldTypeDescription
resultsarray of any
Example response
JSON
{
  "results": []
}

Example request

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

#Output of a container action

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

Path parameters

NameTypeDescription
idrequirednumber

Response 200

FieldTypeDescription
outputstring
Example response
JSON
{
  "output": "string"
}

Errors

StatusMessage
404Not found

Example request

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

#A container image's vulnerabilities

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

Path parameters

NameTypeDescription
devicerequiredstring
imagerequiredstring

Response 200

FieldTypeDescription
findingsarray of any
Example response
JSON
{
  "findings": []
}

Errors

StatusMessage
404Not found

Example request

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