Return ModSecurity domains' status

This function returns ModSecurity's™ status for a cPanel account's domains.

Important:

When you disable the WebServer role, the system disables this function.

SecurityBasicAuth
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/ModSecurity/list_domains
Request samples
uapi --output=jsonpretty \
  --user=username \
  ModSecurity \
  list_domains
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "list_domains",
  • "module": "ModSecurity",
  • "result": {
    • "data": [
      • {
        • "dependencies": [
          • "dallas.com"
          ],
        • "domain": "dallas.example.com",
        • "enabled": 1,
        • "searchhint": "dallas.com",
        • "type": "sub"
        },
      • {
        • "dependencies": [
          • "arkansas.com",
          • "kansas.com",
          • "nevada.com",
          • "newmexico.com",
          • "texas.com"
          ],
        • "domain": "example.com",
        • "enabled": 1,
        • "searchhint": "arkansas.com,kansas.com,nevada.com,newmexico.com,texas.com",
        • "type": "main"
        },
      • {
        • "dependencies": [
          • "galveston.com"
          ],
        • "domain": "galveston.example.com",
        • "enabled": 1,
        • "searchhint": "galveston.com",
        • "type": "sub"
        },
      • {
        • "dependencies": [
          • "houston.com"
          ],
        • "domain": "houston.example.com",
        • "enabled": 0,
        • "searchhint": "houston.com",
        • "type": "sub"
        },
      • {
        • "dependencies": [
          • "neworleans.com"
          ],
        • "domain": "neworleans.example.com",
        • "enabled": 0,
        • "searchhint": "neworleans.com",
        • "type": "sub"
        },
      • {
        • "dependencies": [
          • "sanantonio.com"
          ],
        • "domain": "sanantonio.example.com",
        • "enabled": 0,
        • "searchhint": "sanantonio.com",
        • "type": "sub"
        }
      ],
    • "errors": null,
    • "messages": null,
    • "metadata": {
      • "modsec": {
        • "total_disabled": 3,
        • "total_enabled": 3
        },
      • "transformed": 1
      },
    • "status": 1,
    • "warnings": null
    }
}