Skip to content

JSON objects

Last updated View as MarkdownAgent setup

This page describes the JSON objects used in API requests creating or updating rulesets and their rules via Rulesets API, as well as the objects returned by the API.

Ruleset 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"
}

For details on the properties of rules items in the rules array, refer to the Rule object structure and properties section.

Properties

The ruleset object has the following properties:

  • id String

    • A 32-character UUIDv4 string that 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 String