---
title: "Get details of an alert rule"
method: GET
path: "/alert-policies/{policyId}/rules/{ruleId}"
tags: ["Alert"]
---

# Get details of an alert rule

`GET /alert-policies/{policyId}/rules/{ruleId}`

## Request

- Base URL: `https://api.extremecloudiq.com`
- URL: `https://api.extremecloudiq.com/alert-policies/{policyId}/rules/{ruleId}`
- Auth: HTTP bearer

Get the full details of an alert rule's state. Users can obtain a rule ID by calling #_get_alert_policy first.The returned rule ID might be different from a predefined rule ID provided as a path parameter when the user overrides the predefined rule

## Path parameters

- `policyId` integer, required
- `ruleId` integer, required

## Response `200`

OK

- XiqAlertRule: The state for a configured alert rule
  - `id` integer, required: The unique identifier
  - `message_metadata_id` integer, required: The identifier for the unique message type that corresponds to this rule.
  - `message_metadata_name` string: The display name for the message.
  - `message_metadata_type` string: The type of the message.
  - `description` string: This is a description for the alert rule.
  - `severity_id` integer, required: The severity identifier. The currently supported severity IDs are 1 for critical, 2 for warning, and 3 for info.
  - `severity_name` string: The display name for the alert severity.
  - `is_enabled` boolean, required: True if this rule is active and enabled.
  - `trigger_type` string, required: The configured trigger type of the rule.
  - `duration` integer: Has value when trigger_type is "DEFERRED". The deferred duration, in seconds.
  - `time_window` integer: Has value when trigger_type is "REPEATED". The time window to count the number of repeated messages, in seconds.
  - `count` integer: Has value when trigger_type is "REPEATED". The lower bound of the number of messages required to trigger this rule.
  - `threshold` number, double: Has value when type is "METRIC". The threshold for the message.
  - `unit` string: The unit of this threshold
  - `operator` string: Has value when message_metadata_type is "METRIC". The operator to compare against the threshold.

---

[API](https://skmtc.dev/extremecloudiq/apis/extremecloud-iq-api.md) - [All operations](https://skmtc.dev/extremecloudiq/apis/extremecloud-iq-api/llms.txt) - [OpenAPI document](https://skmtc.dev/extremecloudiq/apis/extremecloud-iq-api/revisions/6a95b08668c3?raw)
