Deleting Site Aliases
Use the delete operation to remove a specified site alias from Plesk database.
Request Packet Structure
A request XML packet removing the site aliases from Plesk database includes the delete operation node:
<packet>
<site-alias>
<delete>
...
</delete>
</site-alias>
</packet>
The delete node graphical representation is as follows:
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.
- 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:
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.
- 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>