pydo.insights.list_alert_instances()

Generated on 6 Nov 2026 from pydo version v0.45.0

Usage

client.insights.list_alert_instances(
    per_page=20,
    page=1,
    status=None,
    rule_id=None,
    resource_urn=None,
)
Returns JSON Raises HttpResponseError

Description

To list alert instances for your account, send a GET request to /v2/insights/alert-instances. Alert instances are read-only records of alert rule firings against your resources.

Results can optionally be filtered by status, rule_id, or resource_urn.

Results are ordered by triggered_at descending (newest first). Because the list is append-only and continuously growing, offset-based pagination is best-effort: newly triggered instances may shift older rows onto subsequent pages between fetches. For stable pagination, filter by rule_id or a fixed time window on the client side.

Parameters

per_page integer optional

Number of items returned per page

Min: 1

Max: 200

Default: 20

page integer optional

Which 'page' of paginated results to return.

Min: 1

Default: 1

status string optional

Optional filter. When set, only alert instances with this status are
returned.

One of: active, resolved

rule_id string optional

Optional filter. When set, only alert instances fired by the alert rule
with this ID are returned.

resource_urn string optional

Optional filter. When set, only resources associated with this resource URN
are returned.

Pagination

This method returns paginated results. The response includes a links.pages object with URLs for navigating between pages. To retrieve the next page, parse the next URL and pass the page parameter:

from urllib.parse import urlparse, parse_qs

resp = client.insights.list_alert_instances()
pages = resp.get("links", {}).get("pages", {})

while "next" in pages:
    parsed = urlparse(pages["next"])
    page = int(parse_qs(parsed.query)["page"][0])
    resp = client.insights.list_alert_instances(page=page)
    pages = resp.get("links", {}).get("pages", {})

Response Example

Show Response Example
{
  "alert_instances": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "rule_id": "8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
      "severity": "warning",
      "status": "active",
      "resource_urn": "do:droplet:12345",
      "value": 87.5,
      "triggered_at": "2026-09-03T10:15:00Z",
      "last_triggered_at": "2026-09-03T10:45:00Z",
      "last_notified_at": "2026-09-03T10:15:00Z"
    }
  ],
  "links": {
    "pages": {}
  },
  "meta": {
    "total": 1
  }
}

More Information

See /v2/insights/alert-instances in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.