Skip to content
Start here

Rules

List rules
GET/accounts/{account_id}/mnm/rules
Get rule
GET/accounts/{account_id}/mnm/rules/{rule_id}
Create rules
POST/accounts/{account_id}/mnm/rules
Update rules
PUT/accounts/{account_id}/mnm/rules
Update rule
PATCH/accounts/{account_id}/mnm/rules/{rule_id}
Delete rule
DELETE/accounts/{account_id}/mnm/rules/{rule_id}
ModelsExpand Collapse
MagicNetworkMonitoringRule = object { automatic_advertisement, name, prefixes, 8 more }
automatic_advertisement: boolean

Toggle on if you would like Cloudflare to automatically advertise the IP Prefixes within the rule via Magic Transit when the rule is triggered. Only available for users of Magic Transit.

name: string

The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.

prefixes: array of string
type: "threshold" or "zscore" or "advanced_ddos"

MNM rule type.

One of the following:
"threshold"
"zscore"
"advanced_ddos"
id: optional string

The id of the rule. Must be unique.

bandwidth_threshold: optional number

The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.

minimum1
duration: optional "1m" or "5m" or "10m" or 5 more

The amount of time that the rule threshold must be exceeded to send an alert notification. The final value must be equivalent to one of the following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"].

One of the following:
"1m"
"5m"
"10m"
"15m"
"20m"
"30m"
"45m"
"60m"
packet_threshold: optional number

The number of packets per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.

minimum1
prefix_match: optional "exact" or "subnet" or "supernet"

Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule.

One of the following:
"exact"
"subnet"
"supernet"
zscore_sensitivity: optional "low" or "medium" or "high"

Level of sensitivity set for zscore rules.

One of the following:
"low"
"medium"
"high"
zscore_target: optional "bits" or "packets"

Target of the zscore rule analysis.

One of the following:
"bits"
"packets"

RulesAdvertisements

Update advertisement for rule
PATCH/accounts/{account_id}/mnm/rules/{rule_id}/advertisement
ModelsExpand Collapse