WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
The cPanel & WHM update’s mode of operation.
- null — Only reinstall cPanel & WHM if a newer version is available.
force— Force a reinstall of cPanel & WHM, even if the system is up to date.sync— Update the currently-installed version of cPanel & WHM instead of downloading a newer version. This ensures the current version installed has the correct files.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/start_cpanel_update
- A server running WHM.
https://whm-server.tld:2087/json-api/start_cpanel_update
- 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/start_cpanel_update?mode=force'{ "data": { "is_new": 1, "log_path": "/var/cpanel/updatelogs/update.1604521159.log", "pid": 23456 }, "metadata": { "command": "start_cpanel_update", "reason": "OK", "result": 1, "version": 1 } }
Request
This function modifies a server's /etc/cpupdate.conf file. This file controls how the server handles software updates and upgrades.
Important:
You must have the root level Access Control List (ACL) privilege to execute this function.
The cPanel & WHM installation's release tier, or a valid version number.
If you do not use this parameter, the system retains the current setting.
A valid cPanel & WHM version number.
STABLE- This version has received considerable public exposure, testing, and verification.RELEASE- This version is feature-complete and well-tested. It contains all intended features and functionality.CURRENT- This version is tested and verified, but it may not contain all of the proposed functionality of a release. This tier is similar to the "release candidate" tier that other publication schemes use.EDGE- This version only has rudimentary testing. The features are subject to further modification. This version usually lacks official public documentation.LTS- Some hosting providers do not wish to upgrade cPanel & WHM to newer major versions. This is a single cPanel & WHM version for the year-long period in which WebPros International, LLC supports it.If you do not set this parameter, the system retains the current setting.
New installations default to RELEASE.
The frequency with which the server updates the operating system distribution's packages each time that the /usr/local/cpanel/scripts/upcp script runs.
If you do not set this parameter, the system retains the current setting.
daily- Update the system packages daily.manual- Update the system packages manually.never- If you specifynever, the server administrator must run the/usr/local/cpanel/scripts/update-packagesscript when they update the server's packages.
The frequency with which the server updates Apache SpamAssassin's™ rules when the /usr/local/cpanel/scripts/upcp script runs.
If you do not set this parameter, the system retains the current setting.
daily- Update Apache SpamAssassin rules daily.manual- Update Apache SpamAssassin rules manually.never- If you specifynever, the server administrator must run the/usr/local/cpanel/scripts/update-packagesscript when they update Apache SpamAssassin's rules.
The absolute directory path to the staging directory for updates.
If you do not set this parameter, the system retains the current setting.
When the system will check for updates.
If you do not set this parameter, the system retains the current setting.
daily- Update cPanel & WHM automatically through a cron job once every 24 hours.manual- Update cPanel & WHM manually.never- Do not update cPanel & WHM.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/update_updateconf
- A server running WHM.
https://whm-server.tld:2087/json-api/update_updateconf
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/update_updateconf?CPANEL=RELEASE&RPMUP=daily&SARULESUP=daily&STAGING_DIR=%2Fusr%2Flocal%2Fcpanel&UPDATES=daily'{ "metadata": { "command": "update_updateconf", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/version
- A server running WHM.
https://whm-server.tld:2087/json-api/version
- 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/version{ "data": { "version": "11.88.0.9999" }, "metadata": { "command": "version", "reason": "OK", "result": 1, "version": 1 } }