public-api
public-alerts

Preview Alerts

Preview which alerts match given filter criteria.

Analyzes historical alerts to show how many would match the specified filters. Useful for tuning alert rules or understanding alert patterns.

SDK Usage:

from anomalyarmor import Client
client = Client()

result = client.alerts.preview(
    event_types=["freshness_stale"],
    severities=["critical"],
    lookback_hours=24,
)

print(f"Matching alerts: {result.alerts_would_match}")
print(f"By severity: {result.alerts_by_severity}")
post/api/v1/sdk/alerts/preview

Request

  • Base URL: http://localhost:8000
  • URL: http://localhost:8000/api/v1/sdk/alerts/preview
  • Auth: none declared

Headers

Authorizationstring

Request body

asset_idstring nullable

Scope to specific asset (UUID or name)

event_typesstring[] nullable

Event types to match (freshness_sla_violation, schema_change, etc.)

severitiesstring[] nullable

Severity levels to match (info, warning, critical)

lookback_hoursinteger

Hours of alert history to analyze

Response

Successful Response

successboolean required
dataunknown
messagestring nullable
errorstring nullable
metaobject nullable

Changes

No recorded changes to this operation across all 1 revision of this API.