Retrieving Information About Reseller Plans

The get operation is used to retrieve information on reseller plans.

 

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet retrieving information on specified reseller plans from Plesk database includes the get operation node:

<packet version="1.6.3.0">
<reseller-plan>
   <get>
   ...
   </get>
</reseller-plan>
</packet>

 

The get node is presented by type ResellerTemplateGetInputType (reseller_template.xsd). Its graphical representation is as follows:

 

 

Response Packet Structure

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

 

Samples

The following packet retrieves information on reseller plans filtered by their IDs:

<packet>
<reseller-plan>
<get>
   <filter>
      <id>4</id>
	   <id>7</id>
   </filter>


   <limits/>
   <permissions/>

</get>
</reseller-plan>
</packet>

Response:

?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
  <reseller-plan>
    <get>
      <result>
        <status>error</status>
        <errcode>1013</errcode>
        <errtext>There is no such a service plan</errtext>
        <id>1</id>
      </result>
      <result>
        <status>ok</status>
        <id>2</id>
        <name>Default Reseller</name>
        <guid>757092e2-b58d-4cb8-9962-04239c73fec5</guid>
        <external-id/>
        <limits>
          <resource-policy>
            <oversell>true</oversell>
            <overuse>not_suspend</overuse>
          </resource-policy>
          <limit>
            <name>max_cl</name>
            <value>-1</value>
          </limit>
...
        </limits>
        <permissions>
          <permission>
            <name>manage_phosting_ssi</name>
            <value>true</value>
          </permission>
...
        </permissions>
      </result>
    </get>
  </reseller-plan>
</packet>

For different filtering rules, use several get operations:

<packet>
<reseller-plan>
<get>
   <filter>
      <id>4</id>
	   <id>7</id>
   </filter>
   <limits/>
</get>
<get>
   <filter>
      <all/>
   </filter>
   <limits/>
</get>
</reseller-plan>
</packet>