Containers
Docker images on devices, their vulnerabilities, and starting, stopping, restarting or updating containers.
| Method | Path | Summary |
|---|---|---|
| GET | /api/containers | 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) |
| POST | /api/containers/actions | Start / stop / restart / update containers (lib/containeractions.js) |
| GET | /api/containers/actions/:id/output | Output of a container action |
| GET | /api/containers/:device/:image/findings | A 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_idcookies from Bramble sign-in).
Licence: Warden.
Response 200
| Field | Type | Description |
|---|---|---|
images | array of object | |
hosts | array of object | |
actions | array 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/actionsStart / 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_idcookies from Bramble sign-in).
Licence: Warden.
Request body JSON
| Name | Type | Description |
|---|---|---|
action | string | |
targets | array of any | |
all | any |
Response 201
| Field | Type | Description |
|---|---|---|
results | array 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_idcookies from Bramble sign-in).
Licence: Warden.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | number |
Response 200
| Field | Type | Description |
|---|---|---|
output | string |
Example response
JSON
{
"output": "string"
}Errors
| Status | Message |
|---|---|
| 404 | Not 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_idcookies from Bramble sign-in).
Licence: Warden.
Path parameters
| Name | Type | Description |
|---|---|---|
devicerequired | string | |
imagerequired | string |
Response 200
| Field | Type | Description |
|---|---|---|
findings | array of any |
Example response
JSON
{
"findings": []
}Errors
| Status | Message |
|---|---|
| 404 | Not 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();Was this page helpful?
Thanks for your feedback.