WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
An available RPM package namespace.
Note:
eaand any fromea4_get_additional_pkg_prefixesAPI call are the only possible values.- If you use this parameter, you cannot use the
packageparameter. - To view more than one namespace, pass the parameter multiple times. For example,
ns=eaandns=altea.
An RPM package name on the system.
Note:
- If you use this parameter, you cannot use the
nsparameter. - To view more than one package, pass the parameter multiple times. For example,
package=ea-php55andpackage=ea-apr-util.
Whether the system will disable yum's exclude behavior.
1— Disable yum's exclude behavior.0— Do not disable yum's exclude behavior.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/package_manager_get_package_info
- A server running WHM.
https://whm-server.tld:2087/json-api/package_manager_get_package_info
- 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/package_manager_get_package_info?ns=ea&package=string&disable-excludes=1'{ "data": { "packages": [ … ] }, "metadata": { "command": "package_manager_get_package_info", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/package_manager_is_performing_actions
- A server running WHM.
https://whm-server.tld:2087/json-api/package_manager_is_performing_actions
- 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/package_manager_is_performing_actions?build=10053'{ "data": { "active": 1 }, "metadata": { "command": "package_manager_is_performing_actions", "reason": "OK", "result": 1, "version": 1 } }
Return RPM packages that exist in a specified state.
any— All RPMs available on the system.installed— The RPMs installed on the system.not_installed— The available RPMs not yet installed on the system.updatable— The RPMs with updates available.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/package_manager_list_packages
- A server running WHM.
https://whm-server.tld:2087/json-api/package_manager_list_packages
- 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/package_manager_list_packages?state=installed'{ "data": { "packages": [ … ] }, "metadata": { "command": "package_manager_list_packages", "reason": "OK", "result": 1, "version": 1 } }