Get alert delivery summary
import requests
url = "https://platform.ankra.app/api/v1/org/alerts/delivery-summary"
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/delivery-summary', 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/delivery-summary \
--header 'Authorization: Bearer <token>'{
"window_days": 123,
"window_start": "2023-11-07T05:31:56Z",
"route_attribution_since": "2023-11-07T05:31:56Z",
"routes": [
{
"route_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_sent_at": "2023-11-07T05:31:56Z",
"last_delivery_at": "2023-11-07T05:31:56Z",
"last_outcome": "sent",
"sent_count": 123,
"failed_count": 123,
"counted_since": "2023-11-07T05:31:56Z"
}
],
"alerts": [
{
"alert_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_sent_at": "2023-11-07T05:31:56Z",
"last_delivery_at": "2023-11-07T05:31:56Z",
"last_outcome": "sent",
"sent_count": 123,
"failed_count": 123,
"counted_since": "2023-11-07T05:31:56Z"
}
]
}Alerts
Get alert delivery summary
Returns, for each notification route and alert the caller can see, when it last sent, how that delivery ended, and how many deliveries it sent and failed to send in the last 30 days. A route’s history before Ankra began recording which route sent a delivery is reported as not known (counted_since null). Requires the alerts.read permission.
GET
/
api
/
v1
/
org
/
alerts
/
delivery-summary
Get alert delivery summary
import requests
url = "https://platform.ankra.app/api/v1/org/alerts/delivery-summary"
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/delivery-summary', 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/delivery-summary \
--header 'Authorization: Bearer <token>'{
"window_days": 123,
"window_start": "2023-11-07T05:31:56Z",
"route_attribution_since": "2023-11-07T05:31:56Z",
"routes": [
{
"route_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_sent_at": "2023-11-07T05:31:56Z",
"last_delivery_at": "2023-11-07T05:31:56Z",
"last_outcome": "sent",
"sent_count": 123,
"failed_count": 123,
"counted_since": "2023-11-07T05:31:56Z"
}
],
"alerts": [
{
"alert_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_sent_at": "2023-11-07T05:31:56Z",
"last_delivery_at": "2023-11-07T05:31:56Z",
"last_outcome": "sent",
"sent_count": 123,
"failed_count": 123,
"counted_since": "2023-11-07T05:31:56Z"
}
]
}Authorizations
Response
The delivery summary
What each notification route and alert the caller can see sent in the last window_days days. Every route the caller's route listing shows and every alert their alert list shows is listed, with zero counts when nothing was sent. Only settled deliveries count; a delivery still being attempted has no outcome yet.