Trends
Each of these APIs returns a statistical trend as a time series. They are almost idenitical except for query strings. For simplicity of documentation, only unique parameters are listed here.
Flows
The number of blocked flows captured each day.
GET https://msp_domain/v2/trends/flows
Alarms
The number of alarms generated each day.
GET https://msp_domain/v2/trends/alarms
Rules
The number of rules created each day.
GET https://msp_domain/v2/trends/rules
Shared Definitions
Header
Query String
Response
200 Success
A JSON array of Trend
401 Permission Denied
Examples
const axios = require('axios');
// Change these three configurations to what you need
const msp_domain = process.env.msp_domain || "mydomain.firewalla.net";
const token = process.env.token || "your_personal_access_token";
const type = process.env.type || "alarms";
const group = process.env.group || "137";
axios({
method: 'get',
url: `https://${msp_domain}/v2/trends/${type}?group=${group}`,
headers: {
Authorization: `Token ${token}`,
"Content-Type": "application/json"
}
}).then((res) => {
let data = res.data;
console.log(data);
})
curl --request GET \
--url "https://${msp_domain}/v2/trends/${type}?group=${group}" \
--header "Authorization: Token ${your_personal_access_token}"