Alarms
An alarm is a set of data that signifies an event. It's Firewalla's core features that summarizes stuff that needs attention so users can better understand and protect their network.
Get Alarms
This API gets all alarms within current MSP.
GET https://msp_domain/v2/alarms
Header
Query String
Response
200 Success
{
"count": 1,
"results": [
{
"aid": 1,
"type": 5,
"message": "Found a new device iPhone connected to your network.",
"ts": 1664522841.895,
"gid": "00000000-0000-0000-0000-000000000000"
}
],
"next_cursor": null
}
401 Permission Denied
Examples
- Get-Active-Alarms-By-Specific-Box,
Query StringPagination
Get An Alarm
This API gets a specific alarm.
GET https://msp_domain/v2/alarms/:gid/:aid
Header
Path
Response
200 Success
A JSON representation of Alarms
{
"aid": 1,
"type": 5,
"message": "Found a new device iPhone connected to your network.",
"ts": 1664522841.895,
"gid": "00000000-0000-0000-0000-000000000000",
"device": {
"name": "iPhone",
"id": "AA:BB:CC:DD:EE:FF",
"ip": "192.168.1.2",
"network": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "Lan 1"
},
"group": {
"id": "1",
"name": "Guest"
}
}
}
401 Permission Denied
Examples
// https://github.com/axios/axios
const axios = require("axios");
// Change these variables to what you have
const msp_domain = process.env.msp_domain || "mydomain.firewalla.net";
const token = process.env.token || "your_personal_access_token";
const gid = "00000000-0000-0000-0000-000000000000";
const aid = 1;
axios({
method: "get",
url: `https://${msp_domain}/v2/alarms/${gid}/${aid}`,
headers: {
"Authorization": `Token ${token}`
}
}).then(res => {
console.log(res.data);
})
curl --request GET \
--url "https://${msp_domain}/v2/alarms/${gid}/${aid}" \
--header "Authorization: Token ${your_personal_access_token}"
Delete An Alarm
This API deletes an existing alarm.
DELETE https://msp_domain/v2/alarms/:gid/:aid
Header
Path
Response
200 Success
401 Permission Denied
404 Not Found
Examples
// https://github.com/axios/axios
const axios = require("axios");
// Change these variables to what you have
const msp_domain = process.env.msp_domain || "mydomain.firewalla.net";
const token = process.env.token || "your_personal_access_token";
const gid = "00000000-0000-0000-0000-000000000000";
const aid = 1;
axios({
method: "delete",
url: `https://${msp_domain}/v2/alarms/${gid}/${aid}`,
headers: {
"Authorization": `Token ${token}`
}
}).then(res => {
console.log(res.data);
})
curl --request DELETE \
--url "https://${msp_domain}/v2/alarms/${gid}/${aid}" \
--header "Authorization: Token ${your_personal_access_token}"
Archive An Alarm MSP 2.11.0 or later
This API archives an existing alarm. The alarm is moved to the archived state and no longer appears among active alarms. Unlike muting, archiving does not create a silence exception, so future traffic matching this alarm can still trigger new alarms.
POST https://msp_domain/v2/alarms/:gid/:aid/archive
Header
Path
Response
200 Success
401 Permission Denied
404 Not Found
Examples
// https://github.com/axios/axios
const axios = require("axios");
// Change these variables to what you have
const msp_domain = process.env.msp_domain || "mydomain.firewalla.net";
const token = process.env.token || "your_personal_access_token";
const gid = "00000000-0000-0000-0000-000000000000";
const aid = 1;
axios({
method: "post",
url: `https://${msp_domain}/v2/alarms/${gid}/${aid}/archive`,
headers: {
"Authorization": `Token ${token}`
}
}).then(res => {
console.log(res.data);
})
curl --request POST \
--url "https://${msp_domain}/v2/alarms/${gid}/${aid}/archive" \
--header "Authorization: Token ${your_personal_access_token}"
Mute An Alarm MSP 2.11.0 or later
This API mutes an alarm. It archives the alarm and instructs the box to create a silence exception so that future traffic matching this alarm will no longer trigger new alarms.
POST https://msp_domain/v2/alarms/:gid/:aid/mute
Header
Path
Body
Response
200 Success
400 Bad Request
401 Permission Denied
404 Not Found
Examples
// https://github.com/axios/axios
const axios = require("axios");
// Change these variables to what you have
const msp_domain = process.env.msp_domain || "mydomain.firewalla.net";
const token = process.env.token || "your_personal_access_token";
const gid = "00000000-0000-0000-0000-000000000000";
const aid = 1;
// Mute by alarm type on all devices
axios({
method: "post",
url: `https://${msp_domain}/v2/alarms/${gid}/${aid}/mute`,
headers: {
"Authorization": `Token ${token}`,
"Content-Type": "application/json"
},
data: {
target: { type: "alarmType" },
scope: { type: "all" }
}
}).then(res => {
console.log(res.data);
})
// Mute a specific destination on all devices
axios({
method: "post",
url: `https://${msp_domain}/v2/alarms/${gid}/${aid}/mute`,
headers: {
"Authorization": `Token ${token}`,
"Content-Type": "application/json"
},
data: {
target: { type: "domain", value: "example.com" },
scope: { type: "all" }
}
}).then(res => {
console.log(res.data);
})
// Mute a specific destination for one device
axios({
method: "post",
url: `https://${msp_domain}/v2/alarms/${gid}/${aid}/mute`,
headers: {
"Authorization": `Token ${token}`,
"Content-Type": "application/json"
},
data: {
target: { type: "domain", value: "example.com" },
scope: { type: "device", value: "AA:BB:CC:DD:EE:FF" }
}
}).then(res => {
console.log(res.data);
})
# Mute by alarm type on all devices
curl --request POST \
--url "https://${msp_domain}/v2/alarms/${gid}/${aid}/mute" \
--header "Authorization: Token ${your_personal_access_token}" \
--header "Content-Type: application/json" \
--data '{"target":{"type":"alarmType"},"scope":{"type":"all"}}'
# Mute a specific destination on all devices
curl --request POST \
--url "https://${msp_domain}/v2/alarms/${gid}/${aid}/mute" \
--header "Authorization: Token ${your_personal_access_token}" \
--header "Content-Type: application/json" \
--data '{"target":{"type":"domain","value":"example.com"},"scope":{"type":"all"}}'
# Mute a specific destination for one device
curl --request POST \
--url "https://${msp_domain}/v2/alarms/${gid}/${aid}/mute" \
--header "Authorization: Token ${your_personal_access_token}" \
--header "Content-Type: application/json" \
--data '{"target":{"type":"domain","value":"example.com"},"scope":{"type":"device","value":"AA:BB:CC:DD:EE:FF"}}'