/domains/{name}/modsec/disabled-rules
0.2.30Unchanged since publicationDisable ModSecurity detection rules for a domain
domainsallSupply rules for multiple rule numbers or rule for a single number. If both fields are present, rules takes precedence. The API returns 400 if neither field is present, if rules is supplied in a form other than an array of 1 to 200 entries, or if a selected rule number is invalid.
The domain's owner and the reseller who manages the owner can disable up to 20 rules for the domain. Only rules disabled on the owner's behalf count toward that limit. Administrators have no per-domain limit. Only an administrator can re-enable a rule disabled by an administrator, even if the owner had already disabled it.
When UrbeStack manages ModSecurity, it updates its Apache configuration, tests it, and reloads Apache. If Apache rejects the configuration, UrbeStack restores the previous configuration and discards the changes. The response returns the updated list of disabled rules for the domain.
As a command
Run as root on the serverParameters
namepath ·DomainNameRequiredRequest body
JSON· 2 fieldsruleintegerrulesarray of integerExample
See the API overview for how to set $API and $TOKEN.curl -sS -X POST "$API/domains/example.com/modsec/disabled-rules" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"rule": 1,
"rules": [
1
]
}'201 Created{
"apache": "text",
"by_owner": 1,
"changed": 1,
"domain": "example.com",
"files_changed": 1,
"left": 1,
"max": 1,
"owner": "text",
"rules": [
{
"at": "text",
"by": "owner",
"by_name": "text",
"domain": "example.com",
"gone": true,
"group": "text",
"id": 1,
"message": "text",
"owner": "text",
"paranoia_level": 1,
"rule": 1,
"score": 1,
"severity": "critical"
}
],
"total": 1
}Errors
13 errors, each a status and a sentence400--as is owner or administrator400--rules takes rule numbers separated by commas400A rule is named by its number400Domain name required400Domain name too long400Invalid domain name400Rule <id> is not one of the rule set's detection rules, the ones that recognize an attack and add to a request's score; only those can be turned off here400Say which rules: one number or several400Up to 200 rules at a time400rules is a list of rule numbers, up to 200401Authentication required403A rule is turned off for every domain by an administrator404Domain '<domain>' not foundurbestack.com/docs/api/post-domains-name-modsec-disabled-rules/