Removing Protected Directory
Use the delete operation to remove a protected directory.
Request Packet Structure
A request XML packet removing a protected directory includes the delete operation node:
<packet>
<protected-dir>
<delete>
...
</delete>
</protected-dir>
</packet>
The delete node is presented by type ProtectedDirDelInput
(protected_dir.xsd
), and its 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 is required. It specifies the filtering rule.
For details, refer to the Available Filters
section. Data type: ProtectedDirFilter (
protected_dir.xsd
).
Response Packet Structure
The delete node of the output XML packet is presented by type
ProtectedDirDeleteOutput (protected_dir.xsd
) and 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 operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. Is returns the error code if the operation fails. Data type: integer.
- The errtext node is optional. It returns the error message if the operation fails. Data type: string.
- The filter-id node is required if the request packet is valid . It returns the filtering rule parameter. For details, refer to the Available Filters section. Data type: anySimple.
- The id node is required if the operation succeeds . It returns the ID of the removed protected directory. Data type: integer.
Samples
Removing a single protected directory
The packet that removes the protected directory with ID 1 looks as follows:
<packet>
<protected-dir>
<delete>
<filter>
<id>1</id>
</filter>
</delete>
</protected-dir>
</packet>
Response:
<protected-dir>
<delete>
<result>
<status>ok</status>
<filter-id>1</filter-id>
<id>1</id>
</result>
</delete>
</protected-dir>
If the protected directory was not found on the server, the response is as follows:
<protected-dir>
<delete>
<result>
<status>error</status>
<errcode>1013</errcode>
<errtext>Protected URL is not found</errtext>
<filter-id>1</filter-id>
</result>
...
</delete>
</protected-dir>
Removing multiple protected directories
The packet that removes all protected directories from site with ID 1 looks as follows:
<packet>
<protected-dir>
<delete>
<filter>
<site-id>1</site-id>
</filter>
</delete>
</protected-dir>
</packet>
Response:
<protected-dir>
<delete>
<result>
<status>ok</status>
<filter-id>1</filter-id>
<id>74</id>
</result>
<result>
<status>ok</status>
<filter-id>1</filter-id>
<id>78</id>
</result>
</delete>
<result>
<status>ok</status>
<filter-id>1</filter-id>
<id>79</id>
</result>
</delete>
</protected-dir>