The add operation of the webspace operator enables you to create a subscription, set the ICP permit status, and assign an ICP permit ID to the subscription’s primary domain.

Request Packet Structure

To create a subscription and set the ICP permit information for the subscription’s primary domain, use the add operation of the webspace operator with the prefs, icp-status, and icp-permit nodes.

<packet>
    <webspace>
        <add>
            <gen_setup>
                ...
            </gen_setup>
            <hosting>
                ...
            </hosting>
            <prefs>
                <icp-status>false</icp-status>
                <icp-permit>123456789</icp-permit>
            </prefs>
        </add>
    </webspace>
</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.9.1/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.9.1/agent_output.svg.

Samples

The following packet creates a subscription with the primary domain named example.com, configures minimal web hosting settings for the domain, grants it the “ICP permit approved” status, and assigns the ICP permit “123456789” to it:

<packet>
    <webspace>
        <add>
            <gen_setup>
                <name>example.com</name>
                <ip_address>192.0.2.48</ip_address>
            </gen_setup>
            <hosting>
                <vrt_hst>
                    <property>
                        <name>ftp_login</name>
                        <value>ftp16se4fdf0</value>
                    </property>
                    <property>
                        <name>ftp_password</name>
                        <value>qweqwe</value>
                    </property>
                    <ip_address>192.0.2.48</ip_address>
                </vrt_hst>
            </hosting>
            <prefs>
                <icp-status>true</icp-status>
                <icp-permit>123456789</icp-permit>
            </prefs>
        </add>
    </webspace>
</packet>

Response:

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