Use the remove operation to remove a virtual directory.
A request XML packet that deletes a virtual directory should include the remove operation node:
<packet>
<virtdir>
<remove>
</remove>
</virtdir>
</packet>
The remove node is presented by type RemoveVDirInputType (virtdir.xsd
). Its graphical representation is as follows:
common.xsd
).
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
The remove node of the output XML packet is structured as follows:
:
common.xsd
).
The following packet deletes a virtual directory with the specified name from the virtual host (site):
<packet version="1.6.3.0">
<virtdir>
<remove>
<site-id>1</site-id>
<name>/my_vdir</name>
</remove>
</virtdir>
</packet>
Response:
<packet version="1.4.2.0">
<virtdir>
<remove>
<result>
<status>ok</status>
</result>
</remove>
</virtdir>
</packet>
To delete multiple virtual directories with a single packet, use multiple remove sections:
<packet version="1.6.3.0">
<virtdir>
<remove>
<site-id>1</site-id>
<name>/my_vdir</name>
</remove>
<remove>
<site-id>2</site-id>
<name>/my_vdir</name>
</remove>
</virtdir>
</packet>
Response:
<packet version="1.4.2.0">
<virtdir>
<remove>
<result>
<status>ok</status>
</result>
</remove>
<remove>
<result>
<status>ok</status>
</result>
</remove>
</virtdir>
</packet>
The remove sections will follow one another in the order they have been sent within the request packet.