Retrieving Available Packages

The get-packages-list operation is used to retrieve information on application packages available for installation on domains/subdomains.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML package that retrieves the list of applications available for installation on domains/subdomains should include the get-packages-list operation node:

<packet version="1.6.2.0">
<aps>
   <get-packages-list>
...
   </get-packages-list>
</aps>
</packet>

The get-packages-list node is structured as follows:

APSPackagesListInputType

 

Response Packet Structure

The get-packages-list node of the output XML packet is structured as follows:

APSPackagesListOutputType

 

Samples

Retrieving information on all APS packages

This packet retrieves information on all APS packages.

<packet>
  <aps>
    <get-packages-list>
      <filter/>
    </get-packages-list>
  </aps>
</packet>

 

Response A

 Positive response received from server can look as follows:

<packet>
  <aps>
    <get-packages-list>
      <result>
        <status>ok</status>
        <filter-id>1</filter-id>
        <package>
          <name>typo3</name>
          <version>4.4.2</version>
          <release>5</release>
          <vendor>http://typo3.org/</vendor>
          <packager>http://plesk.com/</packager>
          <is_uploaded>0</is_uploaded>
          <is_visible>0</is_visible>
          <global_settings_not_set>0</global_settings_not_set>
          <id>1</id>
        </package>
      </result>
    </get-packages-list>
  </aps>
</packet>

 

Response B

Such response is received in case when no APS packages are yet on the server:

<packet>
  <aps>
    <get-packages-list>
      <result>
        <status>ok</status>
      </result>
    </get-packages-list>
  </aps>
</packet>

Retrieving information on particular APS packages  

This packet retrieves information on APS packages with IDs 12 and 13.

<packet>
<aps>
  <get-packages-list>
    <filter>
      <package-id>12</package-id>
      <package-id>13</package-id>
    </filter>
  </get-packages-list>
</aps>
</packet>

Such negative response is received if the package with requested ID does not exist:

<packet>
  <aps>
    <get-packages-list>
      <result>
        <status>error</status>
        <errcode>1013</errcode>
        <errtext>Package does not exist</errtext>
        <filter-id>12</filter-id>
      </result>
      <result>
        <status>error</status>
        <errcode>1013</errcode>
        <errtext>Package does not exist</errtext>
        <filter-id>13</filter-id>
      </result>
    </get-packages-list>
  </aps>
</packet>