WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
This function lists a key's available RPMs. For more information, read our rpm.versions system documentation.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/get_rpm_version_data
- A server running WHM.
https://whm-server.tld:2087/json-api/get_rpm_version_data
- 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_rpm_version_data?section=rpm_groups&key=3rdparty'HTTP Request was successful.
The RPM section and its associated RPMs.
Note:
- This function uses the RPM section's name and RPM key's name for each return value.
- If you specify the
keyparameter, this function returns only the called RPM key. - If you do not specify the
keyparameter, the function returns all RPM keys in the calledsectionparameter.
The RPM section and its associated RPMs.
Note:
- This function uses the RPM section's name and RPM key's name for each return value.
- If you specify the
keyparameter, this function returns only the called RPM key. - If you do not specify the
keyparameter, the function returns all RPM keys in the calledsectionparameter.
{ "data": { "3rdparty": [ … ] }, "metadata": { "command": "get_rpm_version_data", "reason": "OK", "result": 1, "version": 1 } }
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 } }