Update ModSecurity configuration

This function sets a global ModSecurity™ configuration directive.

Important:

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

SecurityBasicAuth
Request
query Parameters
setting_id
required
integer >= 0

The setting's ID.

Note:

The WHM API 1 modsec_get_settings function returns this value.

Example: setting_id=8
state
required
string

The setting's new state. The function uses this as a valid argument for the directive.

Note:

For more information, read SpiderLabs' ModSecurity documentation.

Example: state=2000
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/modsec_set_setting
Request samples
whmapi1 --output=jsonpretty \
  modsec_set_setting \
  setting_id='8' \
  state='2000'
Response samples
application/json
{}