WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/ea4_metainfo
- A server running WHM.
https://whm-server.tld:2087/json-api/ea4_metainfo
- 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/ea4_metainfo{ "data": { "additional_packages": [ … ], "default_php_handler": "cgi", "default_php_package": "ea-php72", "type": "object" }, "metadata": { "command": "ea4_metainfo", "reason": "OK", "result": 1, "version": 1 } }
Request
This function returns any recommendations attached to your installed EasyApache 4 packages. For more information about the recommendation system, read our EasyApache 4 Recommendations documentation.
Important:
When you disable the Web Server role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/ea4_recommendations
- A server running WHM.
https://whm-server.tld:2087/json-api/ea4_recommendations
- 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/ea4_recommendationsHTTP Request was successful.
{ "data": { "ea-php55-php": [ … ] }, "metadata": { "command": "ea4_recommendations", "reason": "OK", "result": 1, "version": 1 } }
Request
This function creates an EasyApache 4 profile. This function only writes files to the /etc/cpanel/ea4/profiles/custom/ directory.
Important:
When you disable the Web Server role, the system disables this function.
The packages that the profile contains.
Whether to overwrite the file, if it exists.
1— Overwrite the file.0— Do not overwrite the file.
Tags that are appropriate for the profile.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/ea4_save_profile
- A server running WHM.
https://whm-server.tld:2087/json-api/ea4_save_profile
- 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/ea4_save_profile?filename=new_profile.json&name=New+Profile&pkg=ea-apache24%2Cea-apache24-foo&desc=This+is+my+new+profile.&overwrite=1&tag=Apache+2.4%2COptimized+for+static+content&version=1.3'{ "data": { "already_exists": 1, "path": "/etc/cpanel/ea4/profiles/custom/new_profile.json" }, "metadata": { "command": "ea4_save_profile", "reason": "OK", "result": 1, "version": 1 } }