Retrieving Information on Subdomains
The get operation is used to retrieve the following information on a subdomain from Plesk database:
- subdomain name
- parent site/subdomain name
- home directory (on Windows only)
- hosting properties
Request Packet Structure
A request XML packet retrieving information on a subdomain includes the get operation node:
The get node is presented by the SubdomainGetInputType (subdomain.xsd
). Its graphical representation is as follows:
- The filter node is required. It specifies the filtering rule. For information on filters, refer to the Available Filters section. Data type: SubdomainFilterType (
subdomain.xsd
).
Response Packet Structure
The get node of the output XML packet is 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 get operation. Data type: result_status (
common.xsd
). Allowed values:ok|error
. - The errcode node is required if the get operation fails. It returns the error code. Data type: unsignedInt.
- The errtext node is required if the get operation fails. It returns the error message. Data type: string.
- The filter-id node is required if the get operation succeeds. It returns the parameter by which the subdomain was filtered in the request packet. Data type: anySimple.
- The id node is required if the get operation succeeds. It returns the ID of the subdomain which settings are retrieved in the response packet. Data type: id_type (
common.xsd
). - The data node is required if the get operation succeeds. It returns a collection of requested subdomain settings. Data type: SubdomainObjectType (
subdomain.xsd
). See the structure of this node below.
The data node is defined by complex type SubdomainObjectType (subdomain.xsd
). It is structured as follows:
- The parent node is required. It returns a name of a parent site/subdomain. Data type: string.
- The name node is required. It returns subdomain name. Data type: string.
- The home node is used on Plesk for Windows only. It returns a path to the subdomain's home directory relative to the parent site root directory. If the home node is left blank (
<home/>
), the root directory of the parent site is used. Data type: string - The property node is required. It returns a hosting setting. To see the structure of this node, refer to the section Subdomain Properties. Data type: SubdomainPropertyType (
subdomain.xsd
).
Possible Errors
- 1006 - Permission is denied.
- 1013 - Subdomain does not exist.
- 1015 - Parent site/subdomain is not found.
- 1023 - Operation failed.
Samples
Getting information on a particular subdomain
This packet retrieves information on the subdomain forum.example.com.
Response:
Getting information on all subdomains of a domain
This packet retrieves information on all subdomains existing on the site example.com.
Getting information on all subdomains of a server
This packet retrieves information on all subdomains hosting on the server.