Including an App in an Add-On Plan

The add-package operation is used to include apps to add-on plans. Once app is included in an add-on plan, it becomes available for installation to all add-on subscribers.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet including a new app in a service plan includes the add-package operation node:

<packet>
<service-plan-addon>
   <add-package>
   ...
   </add-package>
</service-plan-addon>
</packet>

 

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

ServicePLanAddonApplicationInput-add

  • The filter node is required. It serves to specify the criteria by which the necessary add-on plans will be selected from the database. Data type: DomainAddonTemplateFilterType (domain_addon_template.xsd). See the Available Filters section for details on this node.
  • The owner-id node is optional. It specifies the ID of the add-on plan owner. Data type: integer.
  • The owner-login node is optional. It specifies the login name of the add-on plan owner. Data type: string.
  • 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 add-on plan 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 add-one plan. Data type: string.

Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.

 

Response Packet Structure

The add-package node of the output XML packet is of complex type (domain_addon_template.xsd)which has the following presentation:

ServicePLanApplicationOutput-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 add-on plan was filtered by in the request packet. Data type: anySimple.
  • The id node is optional. Returns the identifier of the add-on plan to which the application was added. Data type: id_type (common.xsd).
 

Samples

This packet includes an application WordPress in the add-on plan with id 34.

<packet>
<service-plan-addon>
<add-package>
   <filter>
      <id>23</id>
   </filter>
      <package>
      <name>name</name>
      <value>WordPress</value>
   </package>
</add-package>
</service-plan-addon>
</packet>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
  <service-plan-addon>
    <add-package>
      <result>
        <status>ok</status>
        <filter-id>23</filter-id>
      </result>
    </add-package>
  </service-plan-addon>
</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.