pydo.insights.get_alert_rule()

Generated on 16 Oct 2026 from pydo version v0.44.0

Usage

client.insights.get_alert_rule(id="a1b2c3d4-e5f6-7890-abcd-ef1234567890")
Returns JSON Raises HttpResponseError

Description

To retrieve an alert rule, send a GET request to /v2/insights/alert-rules/{id}.

Parameters

id string required

A unique identifier for an alert rule.

Response Example

Show Response Example
{
  "alert_rule": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "spec": {
      "name": "High CPU",
      "query": {
        "metric": "do.droplets.cpu_utilization",
        "resource_urns": [
          "do:droplet:12345"
        ],
        "tags": [
          "env:prod"
        ]
      },
      "condition": {
        "window": "EVALUATION_WINDOW_5M"
      },
      "thresholds": {
        "warning": 80,
        "critical": 95,
        "operator": "THRESHOLD_OPERATOR_GREATER_THAN"
      },
      "notification_channels": [
        {
          "notification_channel_id": "550e8400-e29b-41d4-a716-446655440000",
          "notify_on": [
            "SEVERITY_CRITICAL"
          ]
        }
      ],
      "re_alert_duration": "RE_ALERT_DURATION_4H"
    },
    "status": "ALERT_RULE_STATUS_ACTIVE",
    "created_at": "2026-09-03T10:00:00Z",
    "updated_at": "2026-09-03T10:00:00Z"
  }
}

More Information

See /v2/insights/alert-rules/{id} 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.