Removing Subdomain

The del operation is used to remove a subdomain from a site/subdomain.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet removing a subdomain from a site/subdomain includes the del operation node:

<packet version="1.5.2.0">
<subdomain>
<del>
...
</del>
</subdomain>
</packet>

 

The del node is presented by the SubdomainDeleteInputType (subdomain.xsd). Its graphical representation is as follows:

SubdomainDeleteInputType

The filter node is required. It specifies the filtering rule. For information on filters, refer to the Available Filters section. Data type: SubdomainFilterType (subdomain.xsd).

 

 

Response Packet Structure

The del node of the output XML packet is structured as follows:

SubdomainDelOutputType

  • The result node is required. It wraps the response retrieved from the server. Data type: resultFilterType (common.xsd).
  • The status node is required. It specifies the execution status of the operation. Data type: result_status (common.xsd). Allowed values: ok|error.
  • The errcode node is required if the del operation fails. It is used to return the error code. Data type: unsignedInt.
  • The errtext node is required if the del operation fails. It is used to return the error message. Data type: string.
  • The filter-id node is required if the del operation succeeds. It returns the filtering rule parameter. For details, refer to the Available Filters section. Data type: anySimple.
  • The id node is required if the del operation succeeds. It returns the ID of a deleted subdomain. Data type: id_type (common.xsd).

 

Possible Errors

  • 1006 - Permission is denied.
  • 1013 - Subdomain does not exist.
  • 1015 - Parent site/subdomain is not found.
  • 1023 - Operation failed.

 

 

Samples

Removing a single subdomain

To remove the subdomain forum.example.com:

<packet>
<subdomain>
<del>
   <filter>
      <name>forum.example.com</name>
   </filter>
</del>
</subdomain>
</packet> 

Response:

<packet version="1.5.2.0">
<subdomain>
   <del>
      <result>
         <status>ok</status>
         <filter-id>13</filter-id>
         <id>13</id>
      </result>
   </del>
</subdomain>
</packet>
Removing multiple subdomains

To remove subdomains with IDs in Plesk database 2, 5 and 6:

<packet>
<subdomain>
<del>
   <filter>
      <id>2</id>
      <id>5</id>
      <id>6</id>
   </filter>
</del>
</subdomain>
</packet>

 

 

Leave your comments on this page

Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.