Add-on Domain or Subdomain

The add operation of the site operator enables you to create an add-on domain or a subdomain belonging to an existing subscription, set the ICP permit status, and assign an ICP permit ID to the add-on domain or subdomain.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 
Request Packet Structure

To create an add-on domain or a subdomain and set the ICP permit information for it, use the add operation of the site operator with the prefs, icp-status, and icp-permit nodes.

<packet>
   <site>
      <add>
         <gen_setup>...</gen_setup>
         <hosting>...</hosting>
         <prefs>
            <icp-status>false</icp-status>
            <icp-permit>123456789</icp-permit>
         </prefs>
      </add>
   </site>
</packet>

For more information about the add node, including its graphical representation and the descriptions and properties of dependent nodes, click here.

Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_input.svg.

 
Response Packet Structure

The structure of the add node of the response packet is described here.

Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_output.svg.

 
Samples

The following packet creates a subdomain named subdomain.example.com belonging to the example.com subscription, configures minimal web hosting settings for the subdomain, grants it the "ICP permit approved" status, and assigns the ICP permit "123456789" to it:

<packet>
   <site>
      <add>
         <gen_setup>
            <name>subdomain.example.com</name>
            <webspace-id>2</webspace-id>
            <parent-site-id>2</parent-site-id>
         </gen_setup>
         <hosting>
            <vrt_hst>
               <property>
                  <name>ftp_login</name>
                  <value>ftp16se4fdf0</value>
               </property>
               <property>
                  <name>ftp_password</name>
                  <value>qweqwe</value>
               </property>
            </vrt_hst>
         </hosting>
         <prefs>
            <icp-status>true</icp-status>
            <icp-permit>123456789</icp-permit>
         </prefs>
      </add>
   </site>
</packet>

Response:

<packet version="1.6.7.0">
   <webspace>
      <add>
         <result>
            <status>ok</status>
            <id>2</id>
            <guid>A3246F55-E12E-4536-9A4A-6F559AD9A185</guid>
         </result>
      </add>
   </webspace>
</packet>