The install-component operation is used to install specified components to your Plesk server.

Note: This operation is supported only in Plesk for Unix.

Request Packet Structure

A request XML packet installing Plesk components includes the install-component operation node:

<packet>
<updater>
   <install-component>
...
   </install-component>
</updater>
</packet>

The graphical representation of the install-component node is as follows:

image 40348

Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_input.svg.

  • The update-id node is required. It specifies the update ID. For info on how to retrieve the update ID, refer to the Retrieving Plesk Updates section. Data type: string.
  • The component-id node is required. It specifies the component ID. For info on how to retrieve the component ID, refer to the Retrieving Plesk Components List section. Data type: string.

Note: When creating request packets, put nodes and elements in the order they follow in the packet structure.

Response Packet Structure

The install-component node of the output XML packet is presented by type UpdaterInstallComponentOutputType (updater.xsd) and structured as follows:

image 40357

Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_output.svg.

  • The result node is required. It wraps the response retrieved from the server. Data type: resultType (common.xsd).
  • The status node is required. It specifies the execution status of the operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. Is returns the error code if the install-component operation fails. Data type: integer.
  • The errtext node is optional. It returns the error message if the install-component operation fails. Data type: string.

Samples

The following request packet upgrades IP Address Banning (Fail2Ban) in Plesk:

<packet version="1.5.0.0">
<updater>
   <install-component>
      <update-id>PLESK_12_5_30</update-id>
      <component-id>fail2ban</component-id>
   </install-component>
</updater>
</packet>

Response:

<packet version="1.5.0.0">
<updater>
   <install-component>
      <result>
         <status>ok</status>
      </result>
   </install-component>
</updater>
</packet>

If Plesk Auto-Installer is busy, the response packet from the server will look as follows:

<packet version="1.5.0.0">
<updater>
   <install-component>
      <result>
         <status>error</status>
         <errcode>1035</errcode>
         <errtext>Error: Installer is busy.</errtext>
      </result>
   </install-component>
</updater>
</packet>