Retrieving Information about a Virtual Directory
The get operation lets you obtain settings of virtual directories.
Request Packet Structure
A request XML packet that creates a virtual directory should include the get operation node:
<packet>
<virtdir>
<get>
...
</get>
</virtdir>
</packet>
The get node is presented by type GetVDirInputType
(virtdir.xsd
). 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 site-id node is required. It holds the identifier of the site that owns the virtual directory. Data type: integer.
- The subdomain-id node is required. It holds the identifier of the subdomain that owns the virtual directory. Data type: integer.
- The name node is required. It holds the name of the virtual
directory. Data type: VDirPath (
common.xsd
).
Note: When creating request packets, put nodes and elements in the order they follow in the packet structure.
Response Packet Structure
The get 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 result of the
create operation. Data type: resultType (
common.xsd
). - The status node is required. Specifies the execution status of the create operation. Data type: string. Allowed values: ok|error.
- The errcode node is optional. Is required if the create operation fails. Returns the error code. Data type: unsignedInt.
- The errtext node is optional. Can be returned if the create operation fails. Returns the error message. Data type: string.
- The filter-id node is optional. It returns the filtering rule parameter. For details, refer to the Available Filters section. Data type: anySimple.
- The id node is optional. It returns the ID of a selected
virtual directory. Data type: id_type (
common.xsd
) . - The properties node is required. It is used to return a
collection of requested virtual directory settings if the get
operation succeeds. Data type: VDirProperties
(
virtdir.xsd
) . For details, refer to the section Virtual Directory Properties.
Samples
The following request packet retrieves a virtual directory /dir
1
properties on the specified site:
<packet>
<virtdir>
<get>
<site-id>1</site-id>
<name>/dir1</name>
</get>
</virtdir>
</packet>
Response:
<packet>
<virtdir>
<get>
<result>
<status>ok</status>
<properties>
<access-source>false</access-source>
<access-read>true</access-read>
<access-write>false</access-write>
<dir-browsing>false</dir-browsing>
<log-visits>true</log-visits>
<default-doc>
<enabled/>
<search>Index.html</search>
<search>Index.htm</search>
<search>Index.cfm</search>
<search>Index.shtml</search>
<search>Index.shtm</search>
<search>Index.stm</search>
<search>Index.php</search>
<search>Index.php3</search>
<search>Index.asp</search>
<search>Index.aspx</search>
<search>Default.htm</search>
<search>Default.asp</search>
<search>Default.aspx</search>
</default-doc>
<access-anonymous>true</access-anonymous>
<require-ssl>false</require-ssl>
<ip-allow/>
<ip-deny/>
<is-deny-by-concurrent-requests>true</is-deny-by-concurrent-requests>
<max-concurrent-requests>4</max-concurrent-requests>
<is-deny-by-request-rate>true</is-deny-by-request-rate>
<max-requests>33</max-requests>
<request-interval>333</request-interval>
</properties>
</result>
</get>
</virtdir>
</packet>