WHM API.
Download OpenAPI description
Overview
URL
WebPros International, LLC
License
Languages
Servers
Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
A server running WHM.
https://{host}:{port}/json-api/
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.
Security
BasicAuth
Query
The packages that the profile contains.
Example: pkg=ea-apache24&pkg=ea-apache24-foo
Whether to overwrite the file, if it exists.
1— Overwrite the file.0— Do not overwrite the file.
Default 0
Enum01
Example: overwrite=1
Tags that are appropriate for the profile.
Default []
Example: tag=Apache 2.4&tag=Optimized for static content
- 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
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
ea4_save_profile \
filename='new_profile.json' \
name='New Profile' \
pkg='ea-apache24' pkg='ea-apache24-foo'Response
application/json
{ "data": { "already_exists": 1, "path": "/etc/cpanel/ea4/profiles/custom/new_profile.json" }, "metadata": { "command": "ea4_save_profile", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/eol_php_sites
- A server running WHM.
https://whm-server.tld:2087/json-api/eol_php_sites
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
eol_php_sitesResponse
application/json
{ "data": { "eol_php_sites": 42 }, "metadata": { "command": "eol_php_sites", "reason": "OK", "result": 1, "version": 1 } }