Skip to main content

Alerts

The SDK provides two alert resources:

  • client.alerts — the central alerts feed, aggregating DQ, smart, and product alerts across a space.
  • client.product_alerts — product-level banner alerts scoped to individual data products.

Central Alerts (client.alerts)

list(space_slug, *, status=)

List aggregated alerts for a space.

ParameterTypeDefaultDescription
space_slugstrrequiredSpace identifier
statusstr | NoneNoneFilter by status (open, resolved)

Returns: list[UnifiedAlert]

alerts = await client.alerts.list("marketing-analytics", status="open")
for alert in alerts:
print(f"[{alert.severity}] {alert.description}")

annotate(alert_id, *, comment)

Add an annotation (comment) to any alert.

ParameterTypeDescription
alert_idUUIDAlert UUID
commentstrAnnotation text

Returns: AlertAnnotation

annotation = await client.alerts.annotate(
alert_id,
comment="Investigating — looks like a source system outage.",
)

update_severity(alert_id, *, severity)

Update the severity of an alert.

ParameterTypeDescription
alert_idUUIDAlert UUID
severitystrNew severity (info, warning, critical)

Returns: dict with updated severity.


resolve(alert_id)

Resolve an alert.

ParameterTypeDescription
alert_idUUIDAlert UUID

Returns: UnifiedAlert (resolved).


create_ticket(alert_id)

Create an issue ticket from an alert, linking them for traceability.

ParameterTypeDescription
alert_idUUIDAlert UUID

Returns: Ticket creation result dict.

result = await client.alerts.create_ticket(alert_id)
print(f"Ticket created: {result['ticket_id']}")

Product Banner Alerts (client.product_alerts)

list(product_id, *, include_expired=)

List alerts for a product.

ParameterTypeDefaultDescription
product_idUUIDrequiredProduct UUID
include_expiredboolFalseInclude expired alerts

Returns: list[ProductAlert]


create(product_id, *, title, severity=, message=, expires_at=)

Create a product banner alert.

ParameterTypeDefaultDescription
product_idUUIDrequiredProduct UUID
titlestrrequiredAlert title
severitystr"info"Severity (info, warning, critical)
messagestr | NoneNoneDetailed message
expires_atstr | NoneNoneISO-8601 expiration timestamp

Returns: ProductAlert

alert = await client.product_alerts.create(
product_id,
title="Schema change detected",
severity="warning",
message="Column `user_id` type changed from INT to VARCHAR.",
expires_at="2024-02-01T00:00:00Z",
)

update(product_id, alert_id, **fields)

Update a product alert.

ParameterTypeDescription
product_idUUIDProduct UUID
alert_idUUIDAlert UUID
**fieldsAnyFields to update

Returns: ProductAlert


delete(product_id, alert_id)

Delete a product alert.

ParameterTypeDescription
product_idUUIDProduct UUID
alert_idUUIDAlert UUID

Returns: None