v4

latestOpenAPI 3.0.1Apache 2.02026-08-036821,1001.5 MB
Alert

Enable a rule from an alert policy

Set the status of a rule to enabled. Users can obtain a rule ID by calling #_get_alert_policy first.If the ENABLE operation adheres to a predetermined rule, a new rule will be duplicated from the predefined one, and the ENABLE operation will be applied to the newly cloned rule. As a result, users might receive a new rule ID that differs from the one provided as a path parameter.

post/alert-policies/{policyId}/rules/{ruleId}/:enable

Path parameters

policyIdinteger required

The policy ID

ruleIdinteger required

The rule ID

Response

OK

idinteger required

The unique identifier

message_metadata_idinteger required

The identifier for the unique message type that corresponds to this rule.

message_metadata_namestring

The display name for the message.

message_metadata_typestring

The type of the message.

descriptionstring

This is a description for the alert rule.

severity_idinteger required

The severity identifier. The currently supported severity IDs are 1 for critical, 2 for warning, and 3 for info.

severity_namestring

The display name for the alert severity.

is_enabledboolean required

True if this rule is active and enabled.

trigger_typestring required

The configured trigger type of the rule.

durationinteger

Has value when trigger_type is "DEFERRED". The deferred duration, in seconds.

time_windowinteger

Has value when trigger_type is "REPEATED". The time window to count the number of repeated messages, in seconds.

countinteger

Has value when trigger_type is "REPEATED". The lower bound of the number of messages required to trigger this rule.

thresholdnumber double

Has value when type is "METRIC". The threshold for the message.

unitstring

The unit of this threshold

operatorstring

Has value when message_metadata_type is "METRIC". The operator to compare against the threshold.