Retrieving Protected Directory Properties
Use the get operation to retrieve properties of a specific protected directory.
Request Packet Structure
A request XML packet changing protected directory properties includes the get operation node:
The get node is presented by type ProtectedDirGetInput (protected_dir.xsd
), and its graphical representation is as follows:
- 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 get node of the output XML packet is presented by type ProtectedDirGetOutput (protected_dir.xsd
) and 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 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 protected directory which properties were retrieved. Data type: integer.
- The data node is required if the operation succeeds. It specifies the protected directory properties. The node is presented by type: complex. Its graphical representation is as follows:
- The name node is optional. It specifies the protected directory name. Data type: string.
- The header node is optional. It specifies the protected directory header. It is the message that is displayed to a user when he tries to access the protected directory. Data type: string.
- The location node is optional. It specifies protected directory properties. The node is present in the response packet only for Plesk for Linux/Unix servers. Data type: complex.
- The property node is required if the location node is specified. It specifies the protected directory property. Data type: ProtectedDirLocationProperty (
protected_dir.xsd
). - The name node is required if the location node is specified. It specifies the protected directory property name. Data type: string. Names and values of properties that can be changed for a specific site or common for all domains properties can be retrieved using the get-pd-location-descriptor operation.
- The value node is required if the location node is specified. It specifies the protected directory property value. Data type: boolean.
Samples
Retrieving properties of a single protected directory
The packet that retrieves properties of the protected directory with ID 1 looks as follows:
Response:
If the protected directory was not found, the response from the server looks as follows:
Retrieving properties of multiple protected directories
The packet that retrieves properties of all protected directories of the site with ID 132 looks as follows:
Response: