Disable ModSecurity rule

This function disables a ModSecurity™ rule.

Important:

When you disable the Web Server role, the system disables this function.

SecurityBasicAuth
Request
query Parameters
config
required
string

The ModSecurity configuration file, relative to the /etc/apache2/conf.d directory.

Example: config=modsec_vendor_configs/example.conf
id
required
string

The ModSecurity rule's ID.

Example: id=1234567890
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
get/modsec_disable_rule
Request samples
whmapi1 --output=jsonpretty \
  modsec_disable_rule \
  config='modsec_vendor_configs/example.conf' \
  id='1234567890'
Response samples
application/json
{
  • "metadata": {
    • "command": "modsec_disable_rule",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}