Sites can be deleted individually or in bulk by sending a del request packet to the Panel.

Request Packet Structure

A request XML packet that deletes sites should include the del operation node:

<packet>
    <site>
        <del>
            ...
        </del>
    </site>
</packet>

The del node does not have a separate type, it is nested within the complex type (site.xsd). The it has the following graphics representation:

image 66611

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.

  • filter, required

    It indicates sites to be deleted. Data type: siteFilterType (site.xsd). To see the structure of this node, proceed to topic Available Filters.

Response Packet Structure

The del node of the response packet is structured as follows:

image 66614

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.

  • result, optional

    It wraps the result of the requested operation. It can be missing if some error occurs before the validation starts. Data type: resultFilterType (common.xsd).

  • status, required

    It returns the execution status of the operation. Data type: string. Allowed values: ok | error.

  • errcode, optional

    It is used to return an error code when the operation fails. Data type: unsignedInt.

  • errtext, optional

    Can be used to return an error message if the operation fails. Data type: string.

  • filter-id, optional

    It is always present and used to return the parameter by which the site was filtered by in the request packet. Data type: anySimple.

  • id, optional

    It is missing if the request packet fails before the validation on the server side. If present, this node identifies the deleted site. Data type: integer.

Samples

This request removes a site:

<packet>
    <site>
        <del>
            <filter>
                <id>18</id>
            </filter>
        </del>
        <del>
            <filter>
                <name>example.net</name>
            </filter>
        </del>
    </site>
</packet>

Response:

<packet>
    <site>
        <del>
            <result>
                <status>ok</status>
                <filter-id>18</filter-id>
                <id>18</id>
            </result>
        </del>
    </site>
</packet>

This packet contains different filtering rules to remove sites:

<packet>
    <site>
        <del>
            <filter>
                <id>123</id>
                <id>124</id>
            </filter>
        </del>
        <del>
            <filter>
                <name>example.com</name>
                <name>example.net</name>
            </filter>
        </del>
    </site>
</packet>

This packet requests to remove all sites owned by a packet sender:

<packet>
    <site>
        <del>
            <filter/>
        </del>
    </site>
</packet>