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

Description


This function resolves the state of a set of EasyApache 4 RPM packages.

Important:

This API call fails and returns an error message if it encounters problems with the package resolution.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/package_manager_resolve_actions?api.version=1&package-10=ea-php70-php-devel&package-9=ea-php56-runtime&package-8=ea-php55-php-common&package-7=ea-apache24-mod_headers&package-6=ea-php56-php-bcmath&package-5=ea-php70-php-xml&package-4=ea-apache24-mod_cgi&package-3=ea-apache24-mod_mpm_prefork&package-2=ea-apache24-mod_mpm_event&package-1=ea-apache24-mod_cgid&package-0=ea-php70-php-curl
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/package_manager_resolve_actions?api.version=1&package-10=ea-php70-php-devel&package-9=ea-php56-runtime&package-8=ea-php55-php-common&package-7=ea-apache24-mod_headers&package-6=ea-php56-php-bcmath&package-5=ea-php70-php-xml&package-4=ea-apache24-mod_cgi&package-3=ea-apache24-mod_mpm_prefork&package-2=ea-apache24-mod_mpm_event&package-1=ea-apache24-mod_cgid&package-0=ea-php70-php-curl 
 Command Line
whmapi1 package_manager_resolve_actions package-10=ea-php70-php-devel package-9=ea-php56-runtime package-8=ea-php55-php-common package-7=ea-apache24-mod_headers package-6=ea-php56-php-bcmath package-5=ea-php70-php-xml package-4=ea-apache24-mod_cgi package-3=ea-apache24-mod_mpm_prefork package-2=ea-apache24-mod_mpm_event package-1=ea-apache24-mod_cgid package-0=ea-php70-php-curl 


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. 

 Output (JSON)
{
   "data":{
      "unaffected":[
         "ea-php70-php-devel",
         "ea-php56-runtime",
         "ea-php55-php-common",
         "ea-apache24-mod_headers",
         "ea-php56-php-bcmath",
  		 "ea-php70-php-curl",
         "ea-php70-php-xml"
      ],
      "uninstall":[
         "ea-apache24-mod_cgi",
         "ea-apache24-mod_mpm_prefork"
      ],
      "install":[
         "ea-apache24-mod_mpm_event",
         "ea-apache24-mod_cgid"
      ],
      "upgrade":[

      ]
   },
   "metadata":{
      "result":1,
      "reason":"OK",
      "command":"package_manager_resolve_actions",
      "version":1
   }
}
 Output (XML)
<result>
    <data>
       <unaffected>ea-php70-php-devel</unaffected>
       <unaffected>ea-php56-runtime</unaffected>
       <unaffected>ea-php55-php-common</unaffected>
       <unaffected>ea-apache24-mod_headers</unaffected>
       <unaffected>ea-php56-php-bcmath</unaffected>
       <unaffected>ea-php70-php-curl</unaffected>
       <unaffected>ea-php70-php-xml</unaffected>
       <uninstall>ea-apache24-mod_cgi</uninstall>
       <uninstall>ea-apache24-mod_mpm_prefork</uninstall>
       <install>ea-apache24-mod_mpm_event</install>
       <install>ea-apache24-mod_cgid</install>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>package_manager_resolve_actions</command>
    </metadata>
</result>


Note:

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

   

Parameters

ParameterTypeDescriptionPossible valuesExample
package string

Required

The name of an RPM package.

Note:

You can specify this parameter multiple times.

A valid package name.

ea-apache24-mod_headers
nsstring

The name space that represents a set of packages.

This parameter defaults to ea.

A valid name space.ea

 

Returns

ReturnTypeDescriptionPossible valuesExample
installarray

The RPM packages that the system would install if you provisioned them as currently selected.

A valid package name.

ea-apache24-mod_suexec

uninstallarray

The RPM packages that the system would uninstall if you provisioned them as currently selected.

A valid package name.

ea-php54-php-common

upgradearray

The RPM packages that the system would upgrade if you provisioned them as currently selected.

A valid package name.

ea-php56
unaffectedarrayThe unaffected RPM packages.A valid package name.

ea-apr-util