WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
This function removes a ModSecurity™ vendor. When you call this function, the system removes the vendor's includes, disablement directives, configuration files, and metadata file.
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_remove_vendor
- A server running WHM.
https://whm-server.tld:2087/json-api/modsec_remove_vendor
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/modsec_remove_vendor?vendor_id=SomeVendor'{ "metadata": { "command": "modsec_remove_vendor", "reason": "OK", "result": 1, "version": 1 } }
Request
This function updates a vendor with the current version of the rule set.
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_update_vendor
- A server running WHM.
https://whm-server.tld:2087/json-api/modsec_update_vendor
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/modsec_update_vendor?url=http%3A%2F%2Fexample.com%2Fupdate%2Fmeta_MyVendor.yaml'{ "data": { "diagnostics": { … }, "vendor": { … } }, "metadata": { "command": "modsec_update_vendor", "reason": "OK", "result": 1, "version": 1 } }