This function retrieves the ModSecurity™ rules from one or more ModSecurity configuration files.
Important:
vendor_id
or the config
parameters.HTTP Request was successful.
object | |
object |
whmapi1 --output=jsonpretty \ modsec_get_rules
{- "data": {
- "chunks": [
- {
- "config": "modsec_vendor_configs/SomeVendor/config.conf",
- "config_active": 0,
- "disabled": 0,
- "id": 662452,
- "meta_msg": "Denied dangerous config traffic",
- "rule": "SecRule REQUEST_FILENAME \"config\" \"deny,id:662452,msg:'Denied dangerous config traffic',severity:1,auditlog\"",
- "staged": 0,
- "vendor_active": 0,
- "vendor_id": "SomeVendor"
}
], - "staged_changes": 0
}, - "metadata": {
- "command": "modsec_get_rules",
- "reason": "OK",
- "result": 1,
- "version": 1
}
}