Get alerting statistics
import requests
url = "https://platform.ankra.app/api/v1/org/alerts/stats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/alerts/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/alerts/stats \
--header 'Authorization: Bearer <token>'{
"total_integrations": 123,
"enabled_integrations": 123,
"total_rules": 123,
"enabled_rules": 123,
"recent_triggers": 123,
"recent_notifications": 123,
"total_webhooks": 123
}Alerts
Get alerting statistics
Returns the organisation’s alerting totals: integrations, alert rules, and the triggers and notifications of the last 24 hours. A caller confined to a project counts what their alert list shows. Requires the alerts.read permission.
GET
/
api
/
v1
/
org
/
alerts
/
stats
Get alerting statistics
import requests
url = "https://platform.ankra.app/api/v1/org/alerts/stats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/alerts/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/alerts/stats \
--header 'Authorization: Bearer <token>'{
"total_integrations": 123,
"enabled_integrations": 123,
"total_rules": 123,
"enabled_rules": 123,
"recent_triggers": 123,
"recent_notifications": 123,
"total_webhooks": 123
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.