Importing Application Package to Plesk
The import-package operation is used to import to Plesk an application package uploaded to the server.
Request Packet Structure
A request XML packet importing APS package to the Plesk contains the import-package operation node:
The import-package node is structured as follows:
-
filename, required
Specifies the name of the application package uploaded to the server. 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-package node of the output XML packet is structured as follows:
-
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.
-
package-id, required if the operation succeeds
Returns the ID assigned to the package on the Plesk-managed server. Data type: id_type (
common.xsd
).
Samples
Request packets importing to Plesk the APS package previously uploaded to the server looks as follows.
On Linux/Unix:
On Windows:
Response:
Such negative response is received if a requested file is not found:
Such negative responses are received in cases a file being imported is not a valid APS application package.
1) The archive being imported lacks APP-META.xml
package metadata file.
2) APP-META.xml
is not validated against the XML schema.