WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
This function parses the /etc/cpanel/TIERS.json file and returns whether a branch qualifies for Long-Term Support (LTS). For more information about LTS, read our cPanel Long-Term Support documentation.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/get_lts_wexpire
- A server running WHM.
https://whm-server.tld:2087/json-api/get_lts_wexpire
- 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/get_lts_wexpire{ "data": { "branch": { … }, "flags": { … }, "tiers": { … } }, "metadata": { "command": "get_lts_wexpire", "reason": "OK", "result": 1, "version": 1 } }
Request
This function checks whether your server uses the latest version of cPanel & WHM for your release tier.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/get_update_availability
- A server running WHM.
https://whm-server.tld:2087/json-api/get_update_availability
- 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/get_update_availability{ "data": { "current_version": "88.0.12", "newest_version": "88.0.12", "tier": "current", "update_available": 0 }, "metadata": { "command": "get_update_availability", "reason": "OK", "result": 1, "version": 1 } }
- 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.
{ "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 } }