Receives resolved alert webhooks from Alertmanager and persists them to the alert_history table. Firing alerts are ignored; only resolved alerts are stored. Authenticated via Bearer token (ALERTING_HISTORY_WEBHOOK_SECRET).
POST
/alert_history
curl \
--request POST 'https://api.your-domain.com/api/alert_history' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"status":"resolved","alerts":[{}],"receiver":"string"}'
Request examples
{
"status": "resolved",
"alerts": [
{}
],
"receiver": "string"
}
Response examples (400)
{
"code": 400,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "username",
"message": "required",
"value": "string"
}
]
}
}
Response examples (401)
{
"code": 401,
"message": "invalid token",
"data": {}
}
Response examples (500)
{
"code": 500,
"message": "internal server error",
"data": {}
}