Skip to main content
POST
Create a rule
Required permission: network_rule.create

Authorizations

Authorization
string
header
required

The Bearer Token generated on the Cloud UI.

Path Parameters

edgeNetwork
string
required

The edge network identifier

ruleset
enum<string>
required

The ruleset, one per type on each dedicated edge network. The ruleset.

  • rate-limit: Rules that limit how many matching requests each visitor can make.
  • cache: Rules that control how matching responses are cached at the edge and in browsers.
  • firewall: Custom WAF rules that block, challenge, log or skip matching requests.
Available options:
rate-limit,
cache,
firewall

Body

application/json
name
string
required

A name for the rule, unique within the ruleset.

Maximum string length: 100
Example:

"Block admin outside the office"

settings
Rate limit · object
required

The rule's action and conditions. Get the ruleset to list the accepted actions and the fields, operators and values each condition can use.

Example:
description
string | null
Maximum string length: 255
position
object

Where to place the rule among your rules in the ruleset, given as exactly one of before or after (the ID of another rule in the ruleset) or index (1 is first). Rules are evaluated in order. Without a position, a new rule is added last and an existing rule keeps its place.

Example:

Response

EdgeNetworkRuleResource

data
EdgeNetworkRuleResource · object
required