Endpoints

Alerts

GET/api/v1/organizations/{org_id}/alerts

Firing, pending, and recently-resolved alert groups in the active org — one row per GROUP, never per member. See AlertRepository.list_for_org for the recently-resolved window and the service-label matching.

Each row's notification_reason/silence (#807 — "a suppressed alert is visibly suppressed, naming the silence") are computed for the WHOLE page in one pass via compute_notification_reasons_bulk, not once per row — see that function's own docstring for the exact query count.

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

org_id*Org Id
Formatuuid

Query Parameters

severity?|

Filter to one severity: info, warning, critical.

rule_id?|

Filter to alert groups under one rule.

service?|

Filter to alert groups whose matched label set (rule.filters ∪ rule.labels ∪ group_labels — the same union silences match against) carries this 'service' value.

Response Body

application/json

application/json

curl -X GET "https://example.com/api/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/alerts"
{  "items": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "rule_id": "728c1541-d6d1-4290-9a53-cdf01dd32d60",      "rule_name": "string",      "severity": "string",      "group_key": "string",      "group_labels": {        "property1": "string",        "property2": "string"      },      "status": "ok",      "member_count": 0,      "status_since": "2019-08-24T14:15:22Z",      "status_duration_seconds": 0,      "notification_reason": "pending",      "silence": {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "reason": "string"      }    }  ]}
GET/api/v1/organizations/{org_id}/alerts/{alert_id}

One alert group by id, within the active org — 404, never 403, across tenants, matching AlertRepository.get_by_id's own docstring. Carries the full state history, the group's members and the condition that produced them, any originated incident and triggered workflow, and the structured "why did/didn't this page someone" answer.

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

alert_id*Alert Id
Formatuuid
org_id*Org Id
Formatuuid

Response Body

application/json

application/json

curl -X GET "https://example.com/api/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/alerts/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "rule_id": "728c1541-d6d1-4290-9a53-cdf01dd32d60",  "rule_name": "string",  "severity": "string",  "group_key": "string",  "group_labels": {    "property1": "string",    "property2": "string"  },  "status": "ok",  "member_count": 0,  "status_since": "2019-08-24T14:15:22Z",  "status_duration_seconds": 0,  "notification_reason": "pending",  "silence": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "reason": "string"  },  "condition": {    "metric": "string",    "filters": {},    "aggregation": "string",    "window_seconds": 0,    "condition": "string",    "threshold": 0,    "for_seconds": 0  },  "members": [    {      "labels": {        "property1": "string",        "property2": "string"      },      "value": 0    }  ],  "state_history": [    {      "from_status": "ok",      "to_status": "ok",      "occurred_at": "2019-08-24T14:15:22Z",      "member_count": 0,      "value": 0    }  ],  "notification_status": {    "reason": "pending",    "detail": "string",    "for_window_remaining_seconds": 0,    "last_transition_at": "2019-08-24T14:15:22Z",    "silence": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "reason": "string"    },    "suppressed_at": "2019-08-24T14:15:22Z"  },  "incident": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "title": "string",    "status": "string",    "severity": "string"  },  "triggered_workflows": []}