Returns trend data for resolved alerts over a specified period with daily data points.
Compares the current period with the previous period of equal length.
Requires read:systems permission.
GET
/alerts/trend
curl \
--request GET 'https://api.your-domain.com/api/alerts/trend' \
--header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
"code": 200,
"message": "alerts trend retrieved successfully",
"data": {
"period": 42,
"period_label": "string",
"current_total": 42,
"previous_total": 42,
"delta": 42,
"delta_percentage": 42.0,
"trend": "up",
"data_points": [
{
"date": "2026-05-04",
"count": 42
}
]
}
}
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 (403)
{
"code": 403,
"message": "insufficient permissions",
"data": {}
}