Hardening
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.
| Method | Path | Summary |
|---|---|---|
| GET | /api/baseline | Hardening overview |
| POST | /api/baseline/enable | Opt-in: Hardening checks run only for organisations that turned it on |
| GET | /api/baseline/policy | The Hardening policy: which rules, per device type, and applying it to a domain as GPOs |
| PUT | /api/baseline/policy | Update the hardening policy |
| POST | /api/baseline/policy/apply | Apply the hardening policy to a domain as Group Policy |
| POST | /api/baseline/policy/applies/:id/undo | Undo a Group Policy apply |
| GET | /api/baseline/platforms | Hardening by platform |
| GET | /api/baseline/platforms/:os | One platform's rules and devices |
| GET | /api/baseline/rules/:id | Get a hardening rule |
| POST | /api/baseline/policy/rules | Add rules to the policy, or take them out, for some device types |
| POST | /api/baseline/policy/apply-now | Apply the policy now on one platform's devices outside a domain (Warden fixes them itself) |
| GET | /api/baseline/devices/:id | A device's hardening results |
| PUT | /api/baseline/devices/:id/type | A Linux device's type (server / workstation) by hand, or null for detected |
| POST | /api/baseline/check | Check devices against the baseline now |
| POST | /api/baseline/plan | Plan hardening fixes |
| POST | /api/baseline/apply | Apply planned hardening fixes |
| POST | /api/baseline/undo | Undo hardening fixes on a device |
| GET | /api/baseline/standard | The Hardening policy as a script a domain admin can run instead of Apply |
| GET | /api/baseline/local-standard | The standard on Windows devices outside a domain (applied by Warden) |
| PUT | /api/baseline/local-standard | Set the standard for devices outside a domain |
| PUT | /api/baseline/exceptions | Add a hardening exception |
| DELETE | /api/baseline/exceptions | Remove a hardening exception |
#Hardening overview
GET
/api/baseline- Address
https://<your-org>.brambleit.cloud/warden/api/baseline- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Response 200
| Field | Type | Description |
|---|---|---|
enabled | boolean | |
can_manage | boolean |
Example response
JSON
{
"…o": "…",
"enabled": true,
"can_manage": true
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#Opt-in: Hardening checks run only for organisations that turned it on
POST
/api/baseline/enable- Address
https://<your-org>.brambleit.cloud/warden/api/baseline/enable- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Permission (any of):warden.directory.manage.
Request body JSON
| Name | Type | Description |
|---|---|---|
on | any |
Response 200
| Field | Type | Description |
|---|---|---|
enabled | boolean | |
queued | any |
Example response
JSON
{
"enabled": true,
"queued": null
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/enable', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"on":"…"}),
});
const data = await res.json();#The Hardening policy: which rules, per device type, and applying it to a domain as GPOs
GET
/api/baseline/policy- Address
https://<your-org>.brambleit.cloud/warden/api/baseline/policy- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Response 200
| Field | Type | Description |
|---|---|---|
can_manage | boolean |
Example response
JSON
{
"…await policy.view(T(req)": "…",
"can_manage": true
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/policy', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#Update the hardening policy
PUT
/api/baseline/policy- Address
https://<your-org>.brambleit.cloud/warden/api/baseline/policy- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Permission (any of):warden.directory.manage.
Response 200
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/policy', {
method: 'PUT',
credentials: 'include',
});
const data = await res.json();#Apply the hardening policy to a domain as Group Policy
POST
/api/baseline/policy/apply- Address
https://<your-org>.brambleit.cloud/warden/api/baseline/policy/apply- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Permission (any of):warden.directory.manage.
Request body JSON
| Name | Type | Description |
|---|---|---|
domain | string |
Response 200
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/policy/apply', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"domain":"string"}),
});
const data = await res.json();#Undo a Group Policy apply
POST
/api/baseline/policy/applies/:id/undo- Address
https://<your-org>.brambleit.cloud/warden/api/baseline/policy/applies/:id/undo- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Permission (any of):warden.directory.manage.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | number |
Response 200
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/policy/applies/12.5/undo', {
method: 'POST',
credentials: 'include',
});
const data = await res.json();#Hardening by platform
GET
/api/baseline/platforms- Address
https://<your-org>.brambleit.cloud/warden/api/baseline/platforms- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Response 200
| Field | Type | Description |
|---|---|---|
can_manage | boolean |
Example response
JSON
{
"…await views.summary(T(re": "…",
"can_manage": true
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/platforms', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#One platform's rules and devices
GET
/api/baseline/platforms/:os- Address
https://<your-org>.brambleit.cloud/warden/api/baseline/platforms/:os- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Path parameters
| Name | Type | Description |
|---|---|---|
osrequired | string |
Response 200
| Field | Type | Description |
|---|---|---|
can_manage | boolean |
Example response
JSON
{
"…await views.platform(T(r": "…",
"can_manage": true
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/platforms/string', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#Get a hardening rule
GET
/api/baseline/rules/:id- Address
https://<your-org>.brambleit.cloud/warden/api/baseline/rules/:id- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Response 200
| Field | Type | Description |
|---|---|---|
can_manage | boolean |
Example response
JSON
{
"…await views.rule(T(req),": "…",
"can_manage": true
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/rules/42', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#Add rules to the policy, or take them out, for some device types
POST
/api/baseline/policy/rules- Address
https://<your-org>.brambleit.cloud/warden/api/baseline/policy/rules- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Permission (any of):warden.directory.manage.
Request body JSON
| Name | Type | Description |
|---|---|---|
rule_ids | array of any | |
profiles | array of any | |
on | boolean |
Response 200
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/policy/rules', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"rule_ids":[],"profiles":[],"on":false}),
});
const data = await res.json();#Apply the policy now on one platform's devices outside a domain (Warden fixes them itself)
POST
/api/baseline/policy/apply-now- Address
https://<your-org>.brambleit.cloud/warden/api/baseline/policy/apply-now- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Permission (any of):warden.directory.manage.
Request body JSON
| Name | Type | Description |
|---|---|---|
os | string: "windows" | "linux" | |
device_ids | array of any | |
profile | string | |
rule_ids | array of any |
Response 200
Errors
| Status | Message |
|---|---|
| 400 | Choose Windows or Linux |
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/policy/apply-now', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"os":"windows","device_ids":[],"profile":"string","rule_ids":[]}),
});
const data = await res.json();#A device's hardening results
GET
/api/baseline/devices/:id- Address
https://<your-org>.brambleit.cloud/warden/api/baseline/devices/:id- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Response 200
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/baseline/devices/42', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#A Linux device's type (server / workstation) by hand, or null for detected
PUT
/api/baseline/devices/:id/type- Address
https://<your-org>.brambleit.cloud/warden/api/baseline/devices/:id/type- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Permission (any of):warden.directory.manage.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Request body JSON
| Name | Type | Description |
|---|---|---|
profile | any |
Response 200
| Field | Type | Description |
|---|---|---|
message | string |
Example response
JSON
{
"message": "Saved"
}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/baseline/devices/42/type', {
method: 'PUT',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"profile":"…"}),
});
const data = await res.json();#Check devices against the baseline now
POST
/api/baseline/check- Address
https://<your-org>.brambleit.cloud/warden/api/baseline/check- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Request body JSON
| Name | Type | Description |
|---|---|---|
device_ids | array of any |
Response 200
| Field | Type | Description |
|---|---|---|
queued | any |
Example response
JSON
{
"queued": null
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/check', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"device_ids":[]}),
});
const data = await res.json();#Plan hardening fixes
POST
/api/baseline/plan- Address
https://<your-org>.brambleit.cloud/warden/api/baseline/plan- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Request body JSON
| Name | Type | Description |
|---|---|---|
device_ids | array of any | |
rule_ids | array of any |
Response 200
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/plan', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"device_ids":[],"rule_ids":[]}),
});
const data = await res.json();#Apply planned hardening fixes
POST
/api/baseline/apply- Address
https://<your-org>.brambleit.cloud/warden/api/baseline/apply- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Request body JSON
| Name | Type | Description |
|---|---|---|
items | array of any |
Response 200
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/apply', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"items":[]}),
});
const data = await res.json();#Undo hardening fixes on a device
POST
/api/baseline/undo- Address
https://<your-org>.brambleit.cloud/warden/api/baseline/undo- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Request body JSON
| Name | Type | Description |
|---|---|---|
device_id | integer | |
rule_ids | array of any |
Response 200
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/baseline/undo', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"device_id":7,"rule_ids":[]}),
});
const data = await res.json();#The Hardening policy as a script a domain admin can run instead of Apply
GET
/api/baseline/standard- Address
https://<your-org>.brambleit.cloud/warden/api/baseline/standard- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Query parameters
| Name | Type | Description |
|---|---|---|
download | string |
Response
A body.
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/standard', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#The standard on Windows devices outside a domain (applied by Warden)
GET
/api/baseline/local-standard- Address
https://<your-org>.brambleit.cloud/warden/api/baseline/local-standard- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Response 200
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/local-standard', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#Set the standard for devices outside a domain
PUT
/api/baseline/local-standard- Address
https://<your-org>.brambleit.cloud/warden/api/baseline/local-standard- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Permission (any of):warden.directory.manage.
Request body JSON
| Name | Type | Description |
|---|---|---|
os | any | |
enabled | boolean | |
scope_type | string: "all" | "site" | "group" | "device" | |
scope_ids | array of any | |
platforms | array of any | |
include_strict | any |
Response 200
| Field | Type | Description |
|---|---|---|
message | string |
Example response
JSON
{
"message": "Saved"
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/local-standard', {
method: 'PUT',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"os":"…","enabled":true,"scope_type":"all","scope_ids":[],"platforms":[],"include_strict":"…"}),
});
const data = await res.json();#Add a hardening exception
PUT
/api/baseline/exceptions- Address
https://<your-org>.brambleit.cloud/warden/api/baseline/exceptions- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Request body JSON
| Name | Type | Description |
|---|---|---|
device_id | string | The device. |
rule_id | integer | The rule it's excused from. |
reason | string | Why. |
Response 200
| Field | Type | Description |
|---|---|---|
message | string |
Example response
JSON
{
"message": "Saved"
}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/baseline/exceptions', {
method: 'PUT',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"device_id":"string","rule_id":7,"reason":"string"}),
});
const data = await res.json();#Remove a hardening exception
DELETE
/api/baseline/exceptions- Address
https://<your-org>.brambleit.cloud/warden/api/baseline/exceptions- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Warden.
Request body JSON
| Name | Type | Description |
|---|---|---|
rule_id | integer | |
device_id | string |
Response 200
| Field | Type | Description |
|---|---|---|
message | string |
Example response
JSON
{
"message": "Saved"
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/exceptions', {
method: 'DELETE',
credentials: 'include',
});
const data = await res.json();Was this page helpful?
Thanks for your feedback.