Including an App in a Service Plan
The add-package operation is used to include apps to service plans. Once app is included in a service plan, it becomes available for installation to all plan subscribers.
Request Packet Structure
A request XML packet including a new app in a service plan includes the add-package operation node:
<packet> <service-plan> <add-package> ... </add-package> </service-plan> </packet>
The add-package node is presented by type ServicePlanApplicationInput (
domain_template.xsd). Its graphical representation is as follows:
- The filter node is required. It serves to specify the criteria by which the necessary service plans will be selected from the database. Data type: DomainTemplateFilterType (
domain_template.xsd). See the Available Filters section for details on this node.
- The owner-id node is optional. It specifies the ID of the service plan owner. Data type: integer.
- The owner-login node is optional. It specifies the login name of the service 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 (
- The name node is required. It specifies whether the name or the URL of the application added to the service 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 service 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_template.xsd)which has the following presentation:
- The result node is required. It wraps the response got from the server. Data type: resultFilterType (
- 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 service plan was filtered by in the request packet. Data type: anySimple.
- The id node is optional. Returns the identifier of the service plan to which the application was added. Data type: id_type (
This packet adds an app WordPress to the service plan base_plan owned by user with login name JDoe.
<packet> <service-plan> <add-package> <filter> <name>base_plan</name> </filter> <owner-login>JDoe</owner-login> <package> <name>name</name> <value>WordPress</value> </package> </add-package> </service-plan> </packet>
<packet> <service-plan> <add-package> <result> <status>ok</status> <filter-id>base_plan</filter-id> <id>1234</id> </result> </add-package> </service-plan> </packet>