Subscriptions 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 subscriptions should include the del operation node:

<packet version="1.6.3.0">
<webspace>
   <del>
   ...
   </del>
</webspace>
</packet>

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

image 33915

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.

  • The filter node is required. It indicates subscriptions to be deleted. Data type: DomainFilterType (domain_input.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 33918

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.

  • The result node is optional. It wraps the result of the requested del operation. It can be missing if some error occurs before the validation starts. Data type: resultFilterType (common.xsd).
  • The status node is required. It returns the execution status of the del operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. It is used to return an error code when the del operation fails. Data type: unsignedInt.
  • The errtext node is optional. Can be used to return an error message if the del operation fails. Data type: string.
  • The filter-id node is optional. It is always present and used to return the parameter by which the subscription was filtered by in the request packet. Data type: anySimple.
  • The id node is optional. It is missing if the request packet fails before the validation on the server side. If present, this node identifies the deleted subscription. Data type: integer.

Samples

Deleting multiple subscriptions under Administrator or under reseller

This request deletes two subscriptions:

<packet>
<webspace>
<del>
   <filter>
      <name>example.com</name>
      <name>sample.net</name>
   </filter>
</del>
</webspace>
</packet>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
  <webspace>
    <del>
      <result>
        <status>ok</status>
        <filter-id>example.com</filter-id>
        <id>2</id>
      </result>
      <result>
        <status>ok</status>
        <filter-id>sample.net</filter-id>
        <id>5</id>
      </result>
    </del>
  </webspace>
</packet>

To filter some subscriptions by id and others by name, use different <del> sections:

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

To delete all subscriptions registered in Plesk, the following packet can be used:

<packet>
<webspace>
<del>
   <filter/>
</del>
</webspace>
</packet>

To delete multiple subscriptions, the request packet should filter them either by id, or by name. The following packet is invalid as it uses both id and name nodes within one filter:

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

To delete all subscriptions of a certain Plesk user, use ‘group’ filtering (see the Available Filters section for details). Plesk users whose subscriptions are deleted can be specified within one filter either by owner-id or by owner-login.

<packet>
<webspace>
<del>
   <filter>
      <owner-login>example.com</owner-login>
      <owner-login>sample.net</owner-login>
   </filter>
</del>
<del>
   <filter>
      <owner-id>1342</owner-id>
      <owner-id>1452</owner-id>
   </filter>
</del>
</webspace>
</packet>

You cannot specify Plesk users by login and by id in one filter. Use different filtering rules instead.