Enable ModSecurity rule

This function enables 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.

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_undisable_rule
Request samples
whmapi1 --output=jsonpretty \
  modsec_undisable_rule \
  config='modsec_vendor_configs/example.conf' \
  id='1234567890'
Response samples
application/json
{
  • "metadata": {
    • "command": "modsec_undisable_rule",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}