API operation · security group
GET
/security/modsec/rules
First published 19 Nov 2026
0.2.30Unchanged since publicationList custom ModSecurity rules
Who may call it
AdministratorResellerCustomer
Token scope, any of
securityreadallAnswers200 OK
Returns the server-wide custom rules saved in UrbeStack, ordered by rule number. Each entry includes the rule text, its note, whether it is enabled, and whether it can refuse a request. Apache reads custom rules after the bundled rule set.
As a command
Run as root on the serverExample
See the API overview for how to set $API and $TOKEN.Request
curl -sS -X GET "$API/security/modsec/rules" \ -H "Authorization: Bearer $TOKEN"
Response ·
200 OK{
"enabled": 1,
"file": "urbestack-panel-20260909T101500Z.json.enc",
"numbers": {
"first": 1,
"last": 1
},
"rules": [
{
"apache": "text",
"created_at": "2026-09-09T10:15:00Z",
"created_by": "text",
"enabled": true,
"files_changed": 1,
"note": "added by hand",
"refuses": true,
"rule": 1,
"text": "text",
"updated_at": "text",
"updated_by": "text"
}
],
"total": 1,
"yours": "text"
}Errors
2 errors, each a status and a sentence401Authentication required404No custom rule has the number <rule>No error of this operation matches.
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.2.30 on 19 Nov 2026.
urbestack.com/docs/api/get-security-modsec-rules/