Rulesets
Versions
Every change to a ruleset creates a new version of it, and the old versions stay readable — useful for seeing what a ruleset looked like before a change, or for recovering a rule that was removed.
Every change to a ruleset creates a new version of it, and the old versions stay readable — useful for seeing what a ruleset looked like before a change, or for recovering a rule that was removed.
List
Fetches the versions of a ruleset.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string|null | Yes | Account Identifier. Provide exactly one of $accountId or $zoneId. | |
zoneId | string|null | Yes | Zone Identifier. Provide exactly one of $accountId or $zoneId. | |
rulesetId | string | Yes | Ruleset Identifier. |
php
$response = $client->rulesets()->versions()->list('ACCOUNT_ID', 'ZONE_ID', 'RULESET_ID');
Get
Fetches a specific version of a ruleset.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string|null | Yes | Account Identifier. Provide exactly one of $accountId or $zoneId. | |
zoneId | string|null | Yes | Zone Identifier. Provide exactly one of $accountId or $zoneId. | |
rulesetId | string | Yes | Ruleset Identifier. | |
version | string | Yes | Version of the ruleset. |
php
$response = $client->rulesets()->versions()->get('ACCOUNT_ID', 'ZONE_ID', 'RULESET_ID', 'VERSION');
Delete
Deletes an existing version of a ruleset.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string|null | Yes | Account Identifier. Provide exactly one of $accountId or $zoneId. | |
zoneId | string|null | Yes | Zone Identifier. Provide exactly one of $accountId or $zoneId. | |
rulesetId | string | Yes | Ruleset Identifier. | |
version | string | Yes | Version of the ruleset. |
php
$response = $client->rulesets()->versions()->delete('ACCOUNT_ID', 'ZONE_ID', 'RULESET_ID', 'VERSION');
By Tag
Fetches the rules of a ruleset version that carry a given tag, such as
wordpress or the CVE a managed rule addresses.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string|null | Yes | Account Identifier. Provide exactly one of $accountId or $zoneId. | |
zoneId | string|null | Yes | Zone Identifier. Provide exactly one of $accountId or $zoneId. | |
rulesetId | string | Yes | Ruleset Identifier. | |
version | string | Yes | Version of the ruleset. | |
tag | string | Yes | Tag the rules carry. |
php
$response = $client->rulesets()->versions()->byTag('ACCOUNT_ID', 'ZONE_ID', 'RULESET_ID', 'VERSION', 'TAG');

