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

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>
    <aps>
        <get-packages-list>
            ...
        </get-packages-list>
    </aps>
</packet>

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

image 66933.gif

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

  • filter, required

    Filters the packages whose information should be retrieved. Data type: none.

    If specified empty, then information on all APS Packages available on the server will be returned in response packet.

  • package-id, optional

    Specifies the ID of a package whose information should be retrieved. Data type: id_type (common.xsd).

  • all, required

    Retrieves the list of applications from APS catalog and applications installed on the server.

Response Packet Structure

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

image 63561

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

  • result, required

    Wraps the response retrieved from the server. Data type: resultType (common.xsd).

  • status, required

    Specifies the execution status of the operation. Data type: string. Allowed values: ok | error.

  • errcode, required if the operation fails

    Returns the error code. Data type: integer.

  • errtext, required if the operation fails

    Returns the error message. Data type: string.

  • filter-id, required if the operation succeeds

    Returns the package ID by which the operation was filtered. Data type: any.

  • id, optional

    Not returned.

  • package, required if the operation succeeds

    Holds a collection of data describing the package. Data type: APSIdentifierType (aps.xsd).

    Structured as follows:

    image 69080

  • name, required

    Specifies the application package name. Data type: string.

  • version, optional

    Specifies the application version.Data type: string.

  • release, optional

    Specifies the package release.Data type: string.

  • vendor, optional

    Specifies the application vendor. Data type: string.

  • packager, optional

    Specifies the application packager. Data type: string

  • is_uploaded, optional

    Specifies whether a package is uploaded to the server manually by the Administrator (not from Application Catalog). Data type: string

  • is_visible, optional

    Specifies if a package is visible to customers and resellers. Data type: string

  • global_settings_not_set, optional Specifies whether the application has global settings that require configuration. Data type: string

  • id, required

    Specifies the ID of the package assigned to it on the server. Data type: id_type (common.xsd).

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://odin.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>