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.
| Parameter | Type | Default | Description |
|---|---|---|---|
space_slug | str | required | Space identifier |
status | str | None | None | Filter 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.
| Parameter | Type | Description |
|---|---|---|
alert_id | UUID | Alert UUID |
comment | str | Annotation 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.
| Parameter | Type | Description |
|---|---|---|
alert_id | UUID | Alert UUID |
severity | str | New severity (info, warning, critical) |
Returns: dict with updated severity.
resolve(alert_id)
Resolve an alert.
| Parameter | Type | Description |
|---|---|---|
alert_id | UUID | Alert UUID |
Returns: UnifiedAlert (resolved).
create_ticket(alert_id)
Create an issue ticket from an alert, linking them for traceability.
| Parameter | Type | Description |
|---|---|---|
alert_id | UUID | Alert 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
product_id | UUID | required | Product UUID |
include_expired | bool | False | Include expired alerts |
Returns: list[ProductAlert]
create(product_id, *, title, severity=, message=, expires_at=)
Create a product banner alert.
| Parameter | Type | Default | Description |
|---|---|---|---|
product_id | UUID | required | Product UUID |
title | str | required | Alert title |
severity | str | "info" | Severity (info, warning, critical) |
message | str | None | None | Detailed message |
expires_at | str | None | None | ISO-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.
| Parameter | Type | Description |
|---|---|---|
product_id | UUID | Product UUID |
alert_id | UUID | Alert UUID |
**fields | Any | Fields to update |
Returns: ProductAlert
delete(product_id, alert_id)
Delete a product alert.
| Parameter | Type | Description |
|---|---|---|
product_id | UUID | Product UUID |
alert_id | UUID | Alert UUID |
Returns: None