Deleting Site Aliases

Use the delete operation to remove a specified site alias from Plesk database.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet removing the site aliases from Plesk database includes the delete operation node:

<packet version="1.6.3.0">
<site-alias>
<delete>
...
</delete>
</site-alias>
</packet>

 

The delete node graphical representation is as follows:

  • The filter node specifies the filtering rule. For information on filters, refer to the Available Filters section. Data type: DomainAliasFilterType (domainalias_input.xsd)

 

 

Response Packet Structure

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

  • 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 delete operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. It returns the error code when the delete operation fails. Data type: unsignedInt.
  • The errtext node is optional. Can be used to return the error message if the delete operation fails. Data type: string.
  • The filter-id node is optional. It returns a filtering rule parameter. For more information, refer to the Available Filters section. Data type:anySimple.
  • The id node is optional. It returns the site alias ID; it is required if the operation delete succeeds. Data type: integer.

 

 

Samples

Deleting a single site alias

This packet deletes the MyAlias.com alias:

<packet>
<site-alias>
   <delete>
      <filter>
             <name>MyAlias.com</name>
      </filter>
   </delete>
</site-alias>
</packet>
Deleting multiple site aliases

This packet deletes all site aliases from the primary sites MyPrimary.com and My2Primary.com.

<packet>
<site-alias>
   <delete>
      <filter>
             <site-name>MyPrimary.com</site-name>
             <site-name>My2Primary.com</site-name>            
      </filter>
   </delete>
</site-alias>
</packet>

 

This packet removes all site aliases from all sites on the server.

<packet>
<site-alias>
   <delete>
      <filter/>
   </delete>
</site-alias>
</packet>