Removing Sites

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

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

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

<packet version="1.6.3.0">
<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:

site-del-rps.gif

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.

  • 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:

site-del-reps.gif

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.

  • 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 version="1.6.3.0">
<site>
<del>
   <filter>
      <id>18</id>
   </filter>
</del>
<del>
   <filter>
      <name>example.net</name>
   </filter>
</del>
</site>
</packet>

Response:

<packet version="1.6.3.0">
  <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 version="1.6.3.0">
<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 version="1.6.3.0">
<site>
<del>
   <filter/>
</del>
</site>
</packet>
 

Leave your feedback on this topic here

If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.