Getting Information About Sites
The get operation lets you obtain the settings of specified sites.
Request Packet Structure
A request XML packet getting information about specified sites includes the get operation node:
<packet>
<site>
<get>
...
</get>
</site>
</packet>
The get node does not have a separate data type, it is nested within the complex type (site.xsd
). The get node has the following graphics representation:
-
filter, required
It specifies the filtering rule to match sites the details on which will be provided. Data type: siteFilterType (
site.xsd
). To see the structure of this node, proceed to section Available Filters. -
dataset, required
It specifies what type of information about the specified sites is requested. Data type: siteDatasetType (
site.xsd
). -
gen_info, optional
It is used to request general information about the specified sites. Data type: none.
-
hosting, optional
It is used to request hosting settings of the specified sites. Data type: none.
-
stat, optional
It is used to request statistics settings of the specified site. Data type: none.
-
prefs, optional
It is used to request preferences set for the specified sites. Data type: none.
-
disk_usage, optional
It is used to request the disk usage information for the specified sites. Data type: none.
Important: 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 response packet is structured as follows:
-
result, optional
It wraps the result of the requested operation. It can be missing if some error occurs before the validation starts. Data type: resultType (
common.xsd
). -
status, required
It returns the execution status of the operation. Data type: string. Allowed values: ok | error.
-
errcode, optional
It is used to return the error code when the operation fails. Data type: unsignedInt.
-
errtext, optional
Can be used to return the error message if the operation fails. Data type: string.
-
filter-id, optional
If supported, it is always present and used to return the parameter by which the site was filtered by in the request packet. Data type: anySimple.
-
id, optional
The node is missing if the request packet fails before the validation on the server side. If present, it returns the identifier of the site whose settings are requested. Data type: id_type (
common.xsd
). -
data, optional
It is used to return a collection of requested site settings if the get operation succeeds. Data type: none.
The data node of the response get packet is structured as follows:
-
gen_info, optional
If specified in the request packet, it returns a collection of general site settings. Data type: siteGenInfoType (
site.xsd
). See the Node get/gen_setup for details. -
hosting, optional
If specified in the request packet, it returns hosting settings of the specified site. Data type: siteHostingAgentGet (
site.xsd
). See the Hosting section for details. -
stat, optional
If specified in the request packet, it returns a collection of statistics settings set for the specified sites. See the definition of this node below. Data type: siteStat (
site.xsd
). See the Statistics section for details. -
prefs, optional
If specified in the request packet, it returns a collection of preferences set for the specified sites. Data type: domainPrefs (
plesk_domain.xsd
). See the Site Preferences section for details. -
disk_usage, optional
If specified in the request packet, it returns a collection of hard disk limits set for the specified sites. Data type: complex. See the Disk Space Usage section for details.
-
performance, optional
This node is not used with this operation.
Samples
Here is a sample request packet that retrieves the hosting information for every site that is not the primary site for a subscription, and every subdomain. To retrieve the settings of domains that are the primary domain for a subscription, use the <webspace> operator. For more information, see the Managing Subscriptions (Webspaces) section.
<packet>
<site>
<get>
<filter/>
<dataset>
<hosting/>
</dataset>
</get>
</site>
</packet>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
<site>
<get>
<result>
<status>ok</status>
<filter-id>4</filter-id>
<id>4</id>
<data>
<gen_info>
<cr_date>2015-12-04</cr_date>
<name>sub.ppu12-5.demo.pp.plesk.ru</name>
<ascii-name>sub.ppu12-5.demo.pp.plesk.ru</ascii-name>
<status>0</status>
<real_size>0</real_size>
<dns_ip_address>10.58.103.100</dns_ip_address>
<htype>vrt_hst</htype>
<guid>ec38e7be-38bd-4048-8a56-3201f5fc6c81</guid>
<webspace-guid>39633a2d-a190-4d98-8af9-059148a5ec00</webspace-guid>
<sb-site-uuid/>
<webspace-id>1</webspace-id>
<description/>
</gen_info>
<hosting>
<vrt_hst>
<property>
<name>ftp_login</name>
<value>mathias.collins</value>
</property>
...
</vrt_hst>
</hosting>
</data>
</result>
</get>
</site>
</packet>
Getting information for a site
The following packet retrieves the hosting information for the site testdomain.tst
.
<packet>
<site>
<get>
<filter>
<name>testdomain.tst</name>
</filter>
<dataset>
<hosting/>
</dataset>
</get>
</site>
</packet>
Response (for Linux hosting):
<packet>
<site>
<get>
<result>
<status>ok</status>
<filter-id>testdomain.tst</filter-id>
<id>1</id>
<data>
<gen_info>
<cr_date>2012-10-16</cr_date>
<name>testdomain.tst</name>
<ascii-name>testdomain.tst</ascii-name>
<status>0</status>
<real_size>35684352</real_size>
<dns_ip_address>10.52.76.204</dns_ip_address>
<dns_ip_address>2002:5bcc:18fd:c:10:52:76:204</dns_ip_address>
<htype>vrt_hst</htype>
<guid>1f0b13e3-1bb6-46c3-9a21-f4437707a69d</guid>
<webspace-guid>1f0b13e3-1bb6-46c3-9a21-f4437707a69d</webspace-guid>
<sb-site-uuid/>
<webspace-id>1</webspace-id>
</gen_info>
<hosting>
<vrt_hst>
<property>
<name>ftp_login</name>
<value>testfiles</value>
</property>
<property>
<name>ftp_password</name>
<value>Qwe123qwE</value>
</property>
...
<property>
<name>www_root</name>
<value>/var/www/vhosts/testdomain.tst/httpdocs</value>
</property>
<property>
<name>safe_mode</name>
<value>off</value>
</property>
<property>
<name>open_basedir</name>
<value>{WEBSPACEROOT}{/}{:}{TMP}{/}</value>
</property>
<ip_address>10.52.76.204</ip_address>
<ip_address>2002:5bcc:18fd:c:10:52:76:204</ip_address>
</vrt_hst>
</hosting>
</data>
</result>
</get>
</site>
</packet>
Note: Some properties retrieved by <get>
may be obsolete and supported for the backward compatibility.