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/
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/installed_versions
- A server running WHM.
https://whm-server.tld:2087/json-api/installed_versions
- 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/installed_versions?packages=1'HTTP Request was successful.
Example: {"apache":"2.4.12","apache_php_default_version":0,"apache_php_versions":[0],"bind":"9.9.4-29","clamav":"0.99.2-1","cpanel_and_whm":"11.64.0.9999","cpanel_packages":["cpanel-ace-editor-1.2.6-1.cp1166.noarch","cpanel-yui-2.9.0-5.cp1136.noarch"],"cpanel_php":"7.2.7-4","cron":0,"cronie":"1.4.11-23","dovecot":"2.2.31 (65cde28)","ea_4_packages":[],"easyapache":"4","exim":"4.89-2","linux_kernel":"3.10.0-327.18.2.el7.x86_64","mailman":"2.1.23-9","mariadb":0,"mariadb_build":0,"munin":0,"mysql":"5.7.61","mysql_build":"5.7.61-1","nscd":"2.17-222","openssh-server":"7.4p1-21","operating_system_name":"centos","operating_system_version":"7.2","os_packages":["ImageMagick-6.7.8.9-15.el7_2.x86_64","zsh-5.0.2-14.el7.x86_64"],"p0f":"3.09b-1","postgresql":0,"postgresql_build":0,"powerdns":0,"proftpd":0,"pureftpd":"1.0.45","roundcube":"1.2.4-1","rsyslog":"8.24.0-16","spamd":"3.4.2","squirrelmail":0}
Response
application/json
{ "data": { "apache": "2.4.12", "apache_php_default_version": 0, "apache_php_versions": [ … ], "bind": "9.9.4-29", "clamav": "0.99.2-1", "cpanel_and_whm": "11.64.0.9999", "cpanel_packages": [ … ], "cpanel_php": "7.2.7-4", "cron": 0, "cronie": "1.4.11-23", "dovecot": "2.2.31 (65cde28)", "ea_4_packages": [], "easyapache": "4", "exim": "4.89-2", "linux_kernel": "3.10.0-327.18.2.el7.x86_64", "mailman": "2.1.23-9", "mariadb": 0, "mariadb_build": 0, "munin": 0, "mysql": "5.7.61", "mysql_build": "5.7.61-1", "nscd": "2.17-222", "openssh-server": "7.4p1-21", "operating_system_name": "centos", "operating_system_version": "7.2", "os_packages": [ … ], "p0f": "3.09b-1", "postgresql": 0, "postgresql_build": 0, "powerdns": 0, "proftpd": 0, "pureftpd": "1.0.45", "roundcube": "1.2.4-1", "rsyslog": "8.24.0-16", "spamd": "3.4.2", "squirrelmail": 0 }, "metadata": { "command": "installed_versions", "reason": "OK", "result": 1, "version": 1 } }
Request
This function lists and manages items in the Feature Showcase.
Note:
- This function's output changes, depending on which value you pass to the
actionparameter. - The example in this document displays the function's return when the
actionparameter value isinfo.
Security
BasicAuth
Query
The function's action.
info— List full details for all available features.list— List the feature IDs for all available features.enable— Enable the feature or features called in thefeaturesparameter.disable— Disable the feature or features called in thefeaturesparameter.
Enum"info""list""enable""disable"
Example: action=info
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/manage_features
- A server running WHM.
https://whm-server.tld:2087/json-api/manage_features
- 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/manage_features?action=info&features=features_example1'HTTP Request was successful.
Example: {"feature":[{"description":"This feature does things.","enabled":1,"feature_key":"featured_example1","link":"https://go.cpanel.net/featureshowcasefeatured_example1","name":"Featured Example 1","recommended":1,"vendor":"Third Party, Inc."},{"description":"This feature also does things.","enabled":1,"feature_key":"featured_example2","link":"https://go.cpanel.net/featureshowcasefeatured_example2","name":"Featured Example 2","recommended":1,"vendor":"WebPros International, LLC"}]}
Response
application/json
{ "data": { "feature": [ … ] }, "metadata": { "command": "manage_features", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/set_cpanel_updates
- A server running WHM.
https://whm-server.tld:2087/json-api/set_cpanel_updates
- 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/set_cpanel_updates?updates=daily'Response
application/json
{ "data": { "updates": "daily" }, "metadata": { "command": "set_cpanel_updates", "reason": "Cpanel update frequency set to daily", "result": 1, "version": 1 } }