JSON object
A fully populated ruleset object has the following JSON structure.
The ruleset object has the following properties:
-
id
-32-character UUIDv4 string
:- Represents the unique Cloudflare-generated identifier for a given version of a ruleset.
- Unique, read-only.
-
name
-string
- A human-readable name for the ruleset.
- The name is immutable. You cannot change the name over the lifetime of the ruleset.
-
description
-string
- Optional description for the ruleset.
- You can change the description over the lifetime of the ruleset.
-
kind
- One ofroot
,zone
,managed
,custom
- The kind of ruleset the JSON object represents.
kind is immutable
-
version
- Integer value starting at1
and incremented by1
each time the ruleset is modified- The version of the ruleset.
- Read-only.
-
rules
- Array of JSON objects- A list of rules to include in the ruleset.
-
last_updated
ISO 8601 timestamp in the formatYYYY-MM-DDThh:mm:ss.TZD
- The time (UTC) when the ruleset was last updated.
- Read-only.
A fully populated rule JSON object has the following structure:
The JSON object properties for a rule are defined as follows:
Property | Description | Value | Notes |
---|---|---|---|
id | Represents the unique Cloudflare-generated identifier for a given version of a rule. | 32-character UUIDv4 string | Unique, read-only |
version | The version of the rule. | Integer value starting at | Read-only. Changing the order of a rule in a ruleset does not change its version. |
action | Defines what happens when there’s a match for the rule expression. | String | The available actions depend on the phase where the rule’s ruleset is executed. |
categories | Tags associated with the current rule. You can define overrides that affect rules with a given tag. | Array of strings | Read-only. Only available in WAF Managed Rules. |
expression | Criteria defining when there is a match for the current rule. | String | The fields and functions you can use in a rule expression depend on the phase where the rule’s ruleset is executed. |
last_updated | The time (UTC) when the rule was last updated. | ISO 8601 timestamp in the format YYYY-MM-DDThh:mm:ss .TZD | Read-only |
enabled | When set to | Boolean |