Defining Available APS Catalogs

The import-config operation is used to import a custom list (configuration file) of APS Catalogs to Plesk.

The configuration file should previously be uploaded to the server by means of the upload operator.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet that imports a custom list (configuration file) of APS Catalogs to Plesk should include the import-config operation node:

<packet version="1.6.2.0">
<aps>
   <import-config>
...
   </import-config>
</aps>
</packet>

The node has the following graphical representation:

APSImportConfigInputType

  • filename, required

    Specifies the name of the configuration file uploaded to the Panel. Data type: string.

    Value should be the temporary file name returned in the upload response (in the "upload/result/file" element).

 

Response Packet Structure

The import-config node of the output XML packet is structured as follows:

APSImportConfigOutputType

  • 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.

 

Samples

Request packets importing the APS Catalogs configuration previously uploaded to the server look as follows.

On Linux/Unix:

<packet version="1.6.2.0">
  <aps>
    <import-config>
      <filename>/usr/local/psa/tmp/li_8FZruf</filename>
    </import-config>
  </aps>
</packet>

 On Windows:

<packet version="1.6.2.0">
  <aps>
    <import-config>
      <filename>"C:/Program Files/Parallels/Plesk/tmp/li_9D.tmp"</filename>
    </import-config>
  </aps>
</packet>

 Response:

<packet version="1.6.2.0">
  <aps>
    <install>
      <result>
        <status>ok</status>
      </result>
    </install>
  </aps>
</packet>

Such negative response is received if a requested file is not found:

<packet version="1.6.2.0">
  <aps>
    <import-config>
      <result>
        <status>error</status>
        <errcode>1013</errcode>
        <errtext>File "/usr/local/psa/tmp/li_8FZruf" does not exist</errtext>
      </result>
    </import-config>
  </aps>
</packet>

Such negative response is received if a requested file has improper access rights (most probably, as a result of uploading it the way different from using the upload agent):

<packet version="1.6.2.0">
  <aps>
    <import-config>
      <result>
        <status>error</status>
        <errcode>1023</errcode>
        <errtext>Unable to use specified file as config file</errtext>
      </result>
    </import-config>
  </aps>
</packet>
 

Leave your comments on this page

Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.