Adding an Application to a Subscription

The add-package operation is used to add applications to subscriptions.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet adding a new application to a subscription includes the add-package operation node:

<packet>
<webspace>
   <add-package>
   ...
   </add-package>
</webspace>
</packet>

 

The add-package node is presented by type WebspaceApplicationInput (webspace.xsd). Its graphical representation is as follows:

WebspaceApplicationInput-add

  • The filter node is required. It specifies the subscription to be updated with the specified information. Data type: DomainFilterType (domain_input.xsd). To see the structure of this node, proceed to topic Available Filters.
  • The package node is required. It specifies what type of information about the added package is requested. Data type: ApplicationInput (plesk_common.xsd).
  • The name node is required. It specifies whether the name or the URL of the application added to the subscription will be specified. Data type: string.
  • The value node is required. It specifies the value of the name or the URL of the application that will be added to the subscription. Data type: string.
 

Response Packet Structure

The add-package node of the response packet is structured as follows:

WebspaceApplicationOutput-add

  • The result node is required. It wraps the response got from the server. Data type: resultFilterType (common.xsd).
  • The status node is required. Specifies the execution status of the operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. Returns the error code when the operation fails. Data type: unsignedInt.
  • The errtext node is optional. Returns the error message if the operation fails. Data type: string.
  • The filter-id node is optional. Returns the parameter by which the subscription was filtered by in the request packet. Data type: anySimple.
  • The id node is optional. Returns the identifier of the subscription to which the application was added. Data type: id_type (common.xsd).
 

Samples

A packet that adds an application package WordPress to the subscription with ID 1234 looks as follows:

<packet>
<webspace>
<add-package>
   <filter>
      <id>1234</id>
   </filter>
   <package>
	   <name>name</name>
	   <value>WordPress</value>
	</package>
</add-package>
</webspace>
</packet>

Response:

<packet>
<webspace>
<add-package>
   <result>
      <status>ok</status>
      <filter-id>1234</filter-id>
      <id>1234</id>
   </result>
</add-package>
</webspace>
</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.