Getting Information About Sites

The get operation lets you obtain the settings of specified sites.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

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:

site-get-rps.gif

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:

site-get-reps.gif

The data node of the response get packet is structured as follows:

site-get-reps-data.gif

 

 

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.