Getting Information About Subscriptions

The get operation lets you obtain settings of given subscriptions.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet getting information about the specified subscriptions includes the get operation node:

<packet>
<webspace>
   <get>
   ...
   </get>
</webspace>
</packet>

 

The get node does not have a separate data type, it is nested within the complex type (domain_input.xsd). The get node has the following graphics representation:

webspace_get

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:

 

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

 

 

Samples

Getting multiple subscriptions 

To specify some subscriptions by id and others by name, use different <get> sections:

<packet>
<webspace>
<get>
   <filter>
      <id>123</id>
      <id>124</id>
   </filter>
   <dataset>
      <hosting/>
   </dataset>
</get>
<get>
   <filter>
      <name>example.com</name>
      <name>sample.net</name>
   </filter>
   <dataset>
      <hosting/>
   </dataset>
</get>
</webspace>
</packet>

 

Multiple subscriptions can be specified within one filter either by id, or by name. The following packet is invalid as it uses both nodes within one filter:

<packet>
<webspace>
<get>
   <filter>
      <id>123</id>
      <id>124</id>
      <name>example.com</name>
   </filter>
   <dataset>
      <hosting/>
   </dataset>
</get>
</webspace>
</packet>

 

To get the information about all subscriptions registered in Plesk, the following packet can be used:

<packet>
<webspace>
<get>
   <filter/>
   <dataset>
      <hosting/>
   </dataset>
</get>
</webspace>
</packet>

To get all subscriptions of a certain Plesk user, use ‘group’ filtering (see the Available Filters section for details). Plesk users whose subscriptions are requested can be specified within one filter either by owner-id or by owner-login.

<packet>
<webspace>
<get>
   <filter>
      <owner-login>JDoe</owner-login>
      <owner-login>RRoe</owner-login>
   </filter>
   <dataset>
      <hosting/>
   </dataset>
</get>
<get>
   <filter>
      <owner-id>1342</owner-id>
      <owner-id>1452</owner-id>
   </filter>
   <dataset>
      <hosting/>
   </dataset>
</get>
</webspace>
</packet>

You cannot specify Plesk users by login and by id in one filter. Use different filters (and <get> nodes) instead.

 

<packet>
<webspace>
<get>
   <filter>
      <owner-login>JDoe</owner-login>
   </filter>
   <dataset>
      <hosting/>
   </dataset>
</get>
<get>
   <filter>
      <owner-id>1342</owner-id>
   </filter>
   <dataset>
      <hosting/>
   </dataset>
</get>
</webspace>
</packet>

 

To retrieve information on all subscriptions belonging to the calling Plesk reseller, specify request packet as follows:

<packet>
<webspace>
<get>
   <filter/>
   <dataset>
      <hosting/>
   </dataset>
</get>
</webspace>
</packet>

Use this packet to retrieve all subscriptions of an XML API requester.

<packet>
<webspace>
<get>
   <filter/>
   <dataset>
      <hosting/>
   </dataset>
</get>
</webspace>
</packet> 
Getting different types of information

To get the whole set of information about Plesk user subscriptions, use the following packet:

<packet>
<webspace>
<get>
   <filter/>
      <owner-login>RRoe</owner-login>
   </filter>
   <dataset/>
</get>
</webspace>
</packet>

To fetch a particular kind of data (e.g. hosting settings, limits, and statistics settings), add certain child elements to in the dataset section as follows:

<packet>
<webspace>
<get>
   <filter>
      <id>123</id>
   </filter>
   <dataset>
      <hosting/>
      <limits/>
      <stat/>
   </dataset>
</get>
</webspace>
</packet>