latestOpenAPI 3.0.2cPanel License2026-08-106251554.3 MB

3da41671c02c

ModSecurity
Rule Settings

Remove all staged ModSecurity rule changes

This function discards the staged ModSecurity™ rule changes, if present, for all of the configuration files.

Important:

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

get/modsec_discard_all_rule_changes

Response

HTTP Request was successful.

Example response

{
  "data": {
    "failed": [
      "modsec_vendor_configs/MyVendor/one.conf"
    ],
    "outcomes": [
      {
        "config": "modsec_vendor_configs/MyVendor/one.conf",
        "exception": "The system could not remove the file /usr/local/apache/conf/modsec_vendor_configs/MyVendor/one.conf.STAGE: Invalid argument\n"
      }
    ]
  },
  "metadata": {
    "command": "modsec_discard_all_rule_changes",
    "reason": "OK",
    "result": 1,
    "version": 1
  }
}