Child pages
  • WHM API 1 Functions - list_rpms

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

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:

Code Block
languagebash
/usr/local/cpanel/scripts/check_cpanel_rpms --list-only --targets[target]

For more information, read our The rpm.versions System documentation.

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/list_rpms?api.version=1



Expand
titleXML API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/list_rpms?api.version=1



Expand
titleCommand Line


Code Block
languagebash
whmapi1 list_rpms

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{
  "data" : {
      "rpms" : [
         "cpanel-pcre"
      ]
   }
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "list_rpms"
  }
}



Expand
titleOutput (XML)


Code Block
languagetext
linenumberstrue
<result>
    <data>
        <rpms>cpanel-pcre</rpms>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>list_rpms</command>
    </metadata>
</result>


Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote


   

Parameters

ParameterTypeDescriptionPossible valuesExample
targetstring

The target that depends on the uninstalled RPMs.

If you do not specify a value, the function will list all of the required but uninstalled RPMs for all RPM targets.

A valid RPM target.

3rdparty

Returns

ReturnTypeDescriptionPossible valuesExample

rpms

array of strings

A list of all RPM dependencies that the server owner has not yet installed.

A valid RPM or list of valid RPMs.cpanel-pcre