Get an alert's trigger history
import requests
url = "https://platform.ankra.app/api/v1/org/alerts/alerts/{alert_id}/history"
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/alerts/{alert_id}/history', 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/alerts/{alert_id}/history \
--header 'Authorization: Bearer <token>'{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"alert_rule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"triggered_at": "<string>",
"trigger_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"alert_name": "<string>",
"rule_name": "<string>",
"notification_type": "<string>",
"resolved_at": "<string>",
"trigger_value": "<string>",
"trigger_details": {},
"resource_snapshot": {},
"acknowledged_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"acknowledged_at": "<string>",
"notes": "<string>",
"duration_seconds": 123,
"notifications": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"webhook_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"webhook_name": "<string>",
"status": "<string>",
"created_at": "<string>",
"sent_at": "<string>",
"response_code": 123
}
],
"job_info": {
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job_status": "<string>",
"executed_at": "<string>",
"error_message": "<string>"
},
"ai_analysis_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reopened_from": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"stats": {
"total_triggers": 123,
"triggered_count": 123,
"resolved_count": 123,
"acknowledged_count": 123,
"avg_resolution_time_seconds": 123
},
"pagination": {
"page": 123,
"page_size": 123,
"total_count": 123,
"total_pages": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Alerts
Get an alert's trigger history
Lists an alert’s firings newest first, with their status, delivery attempts and summary counts. Each item’s trigger_id is what the acknowledge, snooze and resolve operations take. Requires the alerts.read permission.
GET
/
api
/
v1
/
org
/
alerts
/
alerts
/
{alert_id}
/
history
Get an alert's trigger history
import requests
url = "https://platform.ankra.app/api/v1/org/alerts/alerts/{alert_id}/history"
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/alerts/{alert_id}/history', 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/alerts/{alert_id}/history \
--header 'Authorization: Bearer <token>'{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"alert_rule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"triggered_at": "<string>",
"trigger_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"alert_name": "<string>",
"rule_name": "<string>",
"notification_type": "<string>",
"resolved_at": "<string>",
"trigger_value": "<string>",
"trigger_details": {},
"resource_snapshot": {},
"acknowledged_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"acknowledged_at": "<string>",
"notes": "<string>",
"duration_seconds": 123,
"notifications": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"webhook_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"webhook_name": "<string>",
"status": "<string>",
"created_at": "<string>",
"sent_at": "<string>",
"response_code": 123
}
],
"job_info": {
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job_status": "<string>",
"executed_at": "<string>",
"error_message": "<string>"
},
"ai_analysis_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reopened_from": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"stats": {
"total_triggers": 123,
"triggered_count": 123,
"resolved_count": 123,
"acknowledged_count": 123,
"avg_resolution_time_seconds": 123
},
"pagination": {
"page": 123,
"page_size": 123,
"total_count": 123,
"total_pages": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
The page to return.
Required range:
x >= 1Firings per page.
Required range:
1 <= x <= 100Only firings in this status.
Available options:
triggered, resolved, acknowledged