Installing Plesk Extensions

To install a Plesk extension, use the install operation.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 
Request Packet Structure

A request XML packet for an extension installation contains the install operation node:

<packet>   
  <extension>
    <install>
        <url> or <id>
    </install>
  </extension>
</packet>

 

The install node is structured as follows:

extension_install

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 url node is required. It holds the URL of an extension ZIP file. Data type: urlType.
  • The id node is required. It specifies the ID of the extension to be installed. Data type: string.
 
Response Packet Structure

The install node of the output XML packet is of complex type which has the following presentation:

extension_install_response

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.

  • result, required.
    It wraps the result of the install operation. Data type: resultType (common.xsd).
  • status, required.
    It returns the execution status of the operation. Data type: string. Allowed values: ok | error.
  • errcode, required if the operation fails.
    Returns error code. Data type: unsignedInt.
  • errtext, required if the operation fails.
    Returns error message. Data type: string.
 
Samples

The following request packet installs an extension downloaded from the given URL:

<packet>   
  <extension>
    <install>
       <url>http://extore.pp.plesk.ru/packages/43062fb1-d342-4428-9990-c28204241134-traffic-monitor/download</url>
    </install>
  </extension>
</packet>

Response:

<packet version="1.6.8.0">
  <extension>
    <install>
      <result>
        <status>ok</status>
      </result>
    </install>
  </extension>
</packet>

The following request packet installs an extension with the given ID:

<packet>
  <extension>
    <install>
      <id>wp-toolkit</id>
    </install>
  </extension>
</packet>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.9.1">
  <extension>
    <install>
      <result>
        <status>ok</status>
      </result>
    </install>
  </extension>
</packet>