WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
This function adds a new ModSecurity™ vendor rule set to the server.
Important:
When you disable the Web Server role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/modsec_add_vendor
- A server running WHM.
https://whm-server.tld:2087/json-api/modsec_add_vendor
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
modsec_add_vendor \
url='https://example.com/update/meta_MyVendor.yaml'{ "data": { "archive_url": "http://example.com/update/MyVendor.zip", "cpanel_provided": 0, "description": "This is an example of a custom vendor set (updated)", "dist_md5": "307cb5320441ebd712e5581d12100dc9", "dist_sha512": "b55c09bb1835ed4209f0f3ea4a70d099665363f23d3819c0369be429438d675ba2c749dcefdb85cee682ee0bf485558e67d0b0965fe4799865529d943e8e14cb", "enabled": 1, "inst_dist": "MyVendor-2", "installed": 1, "installed_from": "https://example.com/update/meta_MyVendor.yaml", "name": "My Vendor", "path": "/usr/local/apache/conf/modsec_vendor_configs/MyVendor", "report_url": "https://waf.example.com/api/cpanel_feedback?source=1&rule_set=1.229", "supported_versions": [ … ], "vendor_id": "MyVendor", "vendor_url": "http://www.example.com" }, "metadata": { "command": "modsec_add_vendor", "reason": "OK", "result": 1, "version": 1 } }
Request
This function disables a ModSecurity™ vendor rule set.
Note:
This function will not disable vendor configuration files that you have individually enabled.
Important:
When you disable the Web Server role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/modsec_disable_vendor
- A server running WHM.
https://whm-server.tld:2087/json-api/modsec_disable_vendor
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
modsec_disable_vendor \
vendor_id='SomeVendor'{ "data": {}, "metadata": { "command": "modsec_disable_vendor", "reason": "OK", "result": 1, "version": 1 } }
Request
This function disables a ModSecurity™ vendor's configuration files.
Important:
When you disable the Web Server role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/modsec_disable_vendor_configs
- A server running WHM.
https://whm-server.tld:2087/json-api/modsec_disable_vendor_configs
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
modsec_disable_vendor_configs \
vendor_id='SomeVendor'{ "data": { "outcomes": [ … ] }, "metadata": { "command": "modsec_disable_vendor_configs", "reason": "OK", "result": 1, "version": 1 } }