Child pages
  • WHM API 1 Functions - ea4_get_currently_installed_packages
Skip to end of metadata
Go to start of metadata

Description

This function returns a list of the currently-installed EasyApache 4 packages.

Important:

In cPanel & WHM version 76 and later, when you disable the WebServer role, the system disables this function. For more information, read our How to Use Server Profiles documentation.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/ea4_get_currently_installed_packages?api.version=1
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/ea4_get_currently_installed_packages?api.version=1
 Command Line
whmapi1 ea4_get_currently_installed_packages


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
   "metadata":{
      "result":1,
      "reason":"OK",
      "command":"ea4_get_currently_installed_packages",
      "version":1
   },
   "data":{
      "packages":[
         "ea-apache24",
         "ea-apache24-config",
         "ea-apache24-config-runtime",
         "ea-apache24-mod_bwlimited",
         "ea-apache24-mod_cgi",
         "ea-apache24-mod_deflate",
         "ea-apache24-mod_expires",
         "ea-apache24-mod_headers",
         "ea-apache24-mod_mpm_prefork",
         "ea-apache24-mod_proxy",
         "ea-apache24-mod_proxy_http",
         "ea-apache24-mod_security2",
         "ea-apache24-mod_ssl",
         "ea-apache24-mod_suexec",
         "ea-apache24-mod_suphp",
         "ea-apache24-mod_unique_id",
         "ea-apache24-tools",
         "ea-apr",
         "ea-apr-util",
         "ea-cpanel-tools",
         "ea-documentroot",
         "ea-libmcrypt",
         "ea-php-cli"      
      ]
   }
}
 Output (XML)
<result>
    <data>
        <packages>ea-apache24</packages>
        <packages>ea-apache24-config</packages>
        <packages>ea-apache24-config-runtime</packages>
        <packages>ea-apache24-mod_bwlimited</packages>
        <packages>ea-apache24-mod_cgi</packages>
        <packages>ea-apache24-mod_deflate</packages>
        <packages>ea-apache24-mod_expires</packages>
        <packages>ea-apache24-mod_headers</packages>
        <packages>ea-apache24-mod_mpm_prefork</packages>
        <packages>ea-apache24-mod_proxy</packages>
        <packages>ea-apache24-mod_proxy_http</packages>
        <packages>ea-apache24-mod_security2</packages>
        <packages>ea-apache24-mod_ssl</packages>
        <packages>ea-apache24-mod_suexec</packages>
        <packages>ea-apache24-mod_suphp</packages>
        <packages>ea-apache24-mod_unique_id</packages>
        <packages>ea-apache24-tools</packages>
        <packages>ea-apr</packages>
        <packages>ea-apr-util</packages>
        <packages>ea-cpanel-tools</packages>
        <packages>ea-documentroot</packages>
        <packages>ea-libmcrypt</packages>
        <packages>ea-php-cli</packages>        
    </data>
    <metadata>
        <version>1</version>
        <command>ea4_get_currently_installed_packages</command>
        <result>1</result>
        <reason>OK</reason>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
packages array

A list of the currently installed packages.

Any valid package name.

ea-apache24