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

Description


This function returns all available EasyApache 4 packages and each package's state.

Warning:

We removed this function in cPanel & WHM version 58.  

Examples 


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


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)
{
   "data":{
      "ea-php54-php-zendguard":"not_installed",
      "ea-php55-php-posix":"installed",
      "ea-php56-php-devel":"not_installed",
      "ea-php54-php-fileinfo":"not_installed",
      "ea-php55-php-gd":"installed",
      "ea-php55-build":"not_installed",
      "ea-php54-php-sourceguardian":"not_installed",
      "ea-php54-php-ioncube":"not_installed",
      "ea-apr-util-ldap":"not_installed",
      "ea-apache24-mod_mpm_itk-debuginfo":"not_installed",
      "ea-apache24-mod_authn_anon":"not_installed",
      "ea-php56-php-snmp":"not_installed",
      "ea-php56-php-mcrypt":"installed",
   },
   "metadata":{
      "version":1,
      "reason":"OK",
      "result":1,
      "command":"ea4_get_ea_pkgs_state"
   }
}
 Output (XML)
<result>
    <data>
        <ea-php54-php-zendguard>not_installed</ea-php54-php-zendguard>
        <ea-php55-php-posix>installed</ea-php55-php-posix>
        <ea-php56-php-devel>not_installed</ea-php56-php-devel>
        <ea-php54-php-fileinfo>not_installed</ea-php54-php-fileinfo>
        <ea-php55-php-gd>installed</ea-php55-php-gd>
        <ea-php55-build>not_installed</ea-php55-build>
        <ea-php54-php-sourceguardian>not_installed</ea-php54-php-sourceguardian>
        <ea-php54-php-ioncube>not_installed</ea-php54-php-ioncube>
        <ea-apr-util-ldap>not_installed</ea-apr-util-ldap>
        <ea-apache24-mod_mpm_itk-debuginfo>not_installed</ea-apache24-mod_mpm_itk-debuginfo>
        <ea-apache24-mod_authn_anon>not_installed</ea-apache24-mod_authn_anon>
        <ea-php56-php-snmp>not_installed</ea-php56-php-snmp>
        <ea-php56-php-mcrypt>installed</ea-php56-php-mcrypt>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>ea4_get_ea_pkgs_state</command>
    </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
package string

The package's installation status.

Note:

This return uses the package name as the return's name.

  • not_installed — The package is not installed on the system.
  • updatable — The package exists on the system, and will update at the next opportunity.
  • installed — The package is installed on the system.
not_installed