UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.
Download OpenAPI description
Overview
URL
WebPros International, LLC
License
Languages
Servers
Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/
A server running cPanel.
https://{host}:{port}/execute/
Request
This function checks whether ModSecurity™ is installed on a server.
Important:
When you disable the Web Server role, the system disables this function.
Security
BasicAuth
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/ModSecurity/has_modsecurity_installed
- A server running cPanel.
https://cpanel-server.tld:2083/execute/ModSecurity/has_modsecurity_installed
- 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/cpanel.openapi/ModSecurity/has_modsecurity_installedResponse
application/json
{ "apiversion": 3, "func": "has_modsecurity_installed", "module": "ModSecurity", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function returns ModSecurity's™ status for a cPanel account's domains.
Important:
When you disable the WebServer role, the system disables this function.
Security
BasicAuth
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/ModSecurity/list_domains
- A server running cPanel.
https://cpanel-server.tld:2083/execute/ModSecurity/list_domains
- 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/cpanel.openapi/ModSecurity/list_domainsResponse
application/json
{ "apiversion": 3, "func": "list_domains", "module": "ModSecurity", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }