JSON object
A fully populated ruleset object has the following JSON structure.
{  "id": "6a359df138c442b385d20140d4d96919",  "name": "Example Ruleset",  "description": "Description of Example Ruleset",  "kind": "custom",  "version": "2",  "phase": "http_request_firewall_custom",  "rules": [    {      "id": "fdb0dd271f3f40b19679cc5d91396024",      "version": "2",      "action": "block",      "expression": "cf.zone.name eq \"example.com\" ",      "last_updated": "2022-07-20T10:44:29.124515Z"    }  ],  "last_updated": "2022-07-20T10:44:29.124515Z"}The ruleset object has the following properties:
- 
idString- A 32-character UUIDv4 string that represents the unique Cloudflare-generated identifier for a given version of a ruleset.
- Unique, read-only.
 
- 
nameString- A human-readable name for the ruleset.
- The name is immutable. You cannot change the name over the lifetime of the ruleset.
 
- 
descriptionString- Optional description for the ruleset.
- You can change the description over the lifetime of the ruleset.
 
- 
kindString- The kind of ruleset the JSON object represents.
- One of root,zone,managed,custom.
- kindis immutable.
 
- 
versionInteger- The version of the ruleset.
- Read-only value starting at 1and incremented by1each time the ruleset is modified.
 
- 
rulesArray<Rule>- A list of rules to include in the ruleset. Refer to Rule object structure and properties for details.
 
- 
last_updatedTimestamp- The time (UTC) when the ruleset was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.TZD.
- Read-only.
 
- The time (UTC) when the ruleset was last updated in ISO 8601 format: 
A fully populated rule JSON object has the following structure:
{  "id": "fdb0dd271f3f40b19679cc5d91396024",  "version": "2",  "action": "block",  "categories": ["wordpress"],  "expression": "cf.zone.name eq \"example.com\"",  "last_updated": "2022-07-20T10:44:29.124515Z",  "enabled": true}The JSON object properties for a rule are defined as follows:
- 
idString- A 32-character UUIDv4 string that represents the unique Cloudflare-generated identifier for a given version of a rule.
- Unique, read-only.
 
- 
versionInteger- The version of the rule.
- Read-only value starting at 1and incremented by1each time the rule is modified.
- Changing the order of a rule in a ruleset does not change its version.
 
- 
actionString- Defines what happens when there is a match for the rule expression.
- The available actions depend on the phase where the rule's ruleset is executed.
 
- 
categoriesArray<String>- Tags associated with the current rule. You can define overrides that affect rules with a given tag.
- Read-only. Only available in WAF Managed Rules and DDoS managed rulesets.
 
- 
expressionString- Criteria defining when there is a match for the current rule.
- The fields and functions you can use in a rule expression depend on the phase where the rule's ruleset is executed.
 
- 
last_updatedTimestamp- The time (UTC) when the rule was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.TZD.
- Read-only.
 
- The time (UTC) when the rule was last updated in ISO 8601 format: 
- 
enabledBoolean- When set to true, the current rule is enabled.
 
- When set to 
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Products
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark