Skip to content

Alerts API

Query and manage alerts generated by your monitoring rules. For an explanation of alert lifecycle and severity, see Concepts > Alerts.

List Alerts

GET /api/v1/alerts/

Authentication: X-API-Key header or session cookie

Query Parameters

Parameter Type Default Description
rule_id UUID — Filter by rule
severity string — critical, warning, or info
resolved boolean — Filter by resolution status
skip integer 0 Pagination offset
limit integer 100 Page size

Response

[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "rule_id": "660e8400-e29b-41d4-a716-446655440000",
    "severity": "critical",
    "message": "Threshold exceeded: 15 > 10 in 15 min window",
    "is_resolved": false,
    "is_acknowledged": false,
    "created_at": "2026-02-11T14:30:00Z"
  }
]

Examples

curl "https://api.getadwize.com/api/v1/alerts/?severity=critical&resolved=false" \
  -H "X-API-Key: YOUR_API_KEY"
import httpx

response = httpx.get(
    "https://api.getadwize.com/api/v1/alerts/",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={"severity": "critical", "resolved": False},
)

for alert in response.json():
    print(alert["severity"], alert["message"])
const params = new URLSearchParams({
  severity: "critical",
  resolved: "false"
});

const response = await fetch(
  `https://api.getadwize.com/api/v1/alerts/?${params}`,
  { headers: { "X-API-Key": "YOUR_API_KEY" } }
);
const alerts = await response.json();

List Grouped Alerts

GET /api/v1/alerts/grouped

Returns alerts grouped by the rule that generated them, with occurrence counts and sparkline data. This is the same view used on the Adwize dashboard.

Authentication: X-API-Key header or session cookie

Query Parameters

Parameter Type Default Description
status string — Filter by status
severity string — Filter by severity
rule_type string — Filter by rule type
source string — Filter by source
tag string — Filter by tag
category string — Filter by category
limit integer 100 Max groups to return

Alert Activity

GET /api/v1/alerts/activity

Returns time-series data for alert volume charts.

Authentication: X-API-Key header or session cookie

Query Parameters

Parameter Type Default Description
time_range string 7d 1h, 24h, 7d, or 30d

Response

[
  { "timestamp": "2026-02-11T00:00:00Z", "count": 3 },
  { "timestamp": "2026-02-11T01:00:00Z", "count": 1 },
  { "timestamp": "2026-02-11T02:00:00Z", "count": 0 }
]

Get Alert

GET /api/v1/alerts/{alert_id}

Returns a single alert by ID.

Authentication: X-API-Key header or session cookie


Resolve Alert

POST /api/v1/alerts/{alert_id}/resolve

Marks an alert as resolved. Optionally include a note describing what was fixed.

Authentication: X-API-Key header or session cookie

Request Body (Optional)

{
  "note": "Fixed the broken GTM tag causing missing transaction IDs"
}

Response: 200 OK with the updated alert.

Examples

curl -X POST "https://api.getadwize.com/api/v1/alerts/ALERT_ID/resolve" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"note": "Fixed the broken GTM tag"}'
import httpx

response = httpx.post(
    f"https://api.getadwize.com/api/v1/alerts/{alert_id}/resolve",
    headers={"X-API-Key": "YOUR_API_KEY"},
    json={"note": "Fixed the broken GTM tag"},
)
await fetch(`https://api.getadwize.com/api/v1/alerts/${alertId}/resolve`, {
  method: "POST",
  headers: {
    "X-API-Key": "YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({ note: "Fixed the broken GTM tag" })
});

Acknowledge Alert

POST /api/v1/alerts/{alert_id}/acknowledge

Marks an alert as acknowledged, indicating someone is investigating.

Authentication: X-API-Key header or session cookie

Request Body (Optional)

{
  "note": "Investigating the issue"
}

Response: 200 OK with the updated alert.

curl -X POST "https://api.getadwize.com/api/v1/alerts/ALERT_ID/acknowledge" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"note": "Looking into this"}'

Delete Alert

DELETE /api/v1/alerts/{alert_id}

Permanently removes an alert.

Authentication: X-API-Key header or session cookie

Response: 204 No Content