Statistics Settings

Statistics settings can be received from Plesk server in the get response packet. The stat node of the get response packet is defined by the domainStat data type (plesk_domain.xsd) and contains a collection of statistics data for the specified domains. This node is structured as follows:

 

The following response packet returns statistics settings for two filtered domains (ID 2435 and ID 2567):

<packet version="1.4.2.0">
<domain>
<get>
   <result>
      <status>ok</status>
      <filter-id>2435</filter-id>
      <id>2435</id>
      <data>
          <stat>
             <traffic>12458966221478885</traffic>
             <subdom>12</subdom>
             <wu>134</wu>
             <box>1024</box>
             <redir>2</redir>
             <mg>16</mg>
             <resp>124</resp>
             <maillists>4<maillists>
             <db></db>
             <webapps>8</webapps>
             <traffic_prevday>15241632184739856</traffic_prevday>
          </stat>
      </data>
   </result>
   <result>
      <status>ok</status>
      <filter-id>2567</filter-id>
      <id>2567</id>
      <data>
          <stat>
             <traffic>5896615637124</traffic>
             <subdom>10</subdom>
             <wu>18</wu>
             <box>102</box>
             <redir></redir>
             <mg>11</mg>
             <resp>12</resp>
             <maillists>6<maillists>
             <db>2</db>
             <webapps>5</webapps>
             <traffic_prevday>152562874868127</traffic_prevday>
          </stat>
      </data>
   </result>
</get>
</domain>
</packet>

This packet is specific for API RPC 1.4.2.0: the response contains the filtering parameter (the filter-id node). The request packet filtered the domain by domain ID, so the filter-id node of the response packet returns this filtering parameter, and the id node returns the domain identifier. Note that the earlier versions of API RPC protocol do not support this feature.