/security/modsec
0.2.30Unchanged since publicationGet the server's ModSecurity status
securityreadallReturns who manages ModSecurity, the configured server mode, and whether the module is installed and loaded by Apache. The response includes the module's package and installed version, the versions of the bundled OWASP CRS and WordPress exclusions, whether OWASP CRS is included, and the request body limits.
The response identifies UrbeStack's configuration file, the administrator's configuration file, the package's configuration file, and the module loader. It reports whether the package settings are active and gives the file and line of any SecRuleEngine directive in the administrator's file that sets the mode for domains that follow the server mode. It also gives domain and rule counts and, if the server mode has been set, who last set it and when.
The state is not_managed when the administrator controls ModSecurity, missing when UrbeStack manages it and the module is absent, or not_loaded when the installed module is unloaded. The conflict state identifies a file whose overlapping rule numbers prevent UrbeStack from including OWASP CRS. The by_hand state means the administrator's configuration sets SecRuleEngine. The managed state means UrbeStack's configuration applies.
As a command
Run as root on the serverExample
See the API overview for how to set $API and $TOKEN.curl -sS -X GET "$API/security/modsec" \ -H "Authorization: Bearer $TOKEN"
200 OK{
"by_hand": {
"directive": "text",
"file": "urbestack-panel-20260909T101500Z.json.enc",
"line": 1,
"mode": "text"
},
"decided": true,
"disabled_rules": {
"by_administrators": 1,
"by_owners": 1,
"domains": 1,
"gone": 1,
"server": 1,
"total": 1
},
"domains": {
"customized": 1,
"in_force": {
"blocking": 1,
"logging": 1,
"off": 1
},
"lowered": 1,
"own_mode": 1,
"total": 1
},
"files": {
"loader": "text",
"ours": "text",
"ours_written_at": "text",
"packaged": "text",
"yours": "text"
},
"installed": true,
"limits": {
"request": 1,
"request_without_files": 1
},
"loaded": true,
"managed": true,
"mode": "off",
"mode_set": {
"at": "text",
"by": "text"
},
"module": {
"file": "urbestack-panel-20260909T101500Z.json.enc",
"package": "basic",
"version": "0.0.1"
},
"other_rule_set": {
"file": "urbestack-panel-20260909T101500Z.json.enc"
},
"own_rules": {
"enabled": 1,
"file": "urbestack-panel-20260909T101500Z.json.enc",
"total": 1
},
"packaged_active": true,
"rule_set": {
"included": true,
"name": "alice",
"version": "0.0.1"
},
"state": "managed",
"wordpress_exclusions": {
"version": "0.0.1"
}
}Errors
1 error, each a status and a sentence401Authentication requiredurbestack.com/docs/api/get-security-modsec/