WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
This function lists RPMs that the server needs, but the server owner has not yet installed. When you call this function, it performs the same actions as the following command:
/usr/local/cpanel/scripts/check_cpanel_pkgs --list-only --targets[target]
For more information, read our rpm.versions system documentation.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/list_rpms
- A server running WHM.
https://whm-server.tld:2087/json-api/list_rpms
- 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/list_rpms?target=3rdparty'{ "data": { "rpms": [ … ] }, "metadata": { "command": "list_rpms", "reason": "OK", "result": 1, "version": 1 } }
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 } }