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:

  • The filter node is required. It specifies the filtering rule. For more information on filters, refer to the Available Filters section. Data type: ResellerTemplateFilter (reseller_template.xsd).
  • The limits node is optional. It is used to request limits policy and limits on using Plesk resources for resellers created with a reseller plan. Data type: none.
  • The permissions node is optional. It is used to request permissions settings for resellers created with a reseller plan. Data type: none.
  • The ip-pool node is optional. It is used to request for IP pool settings for resellers created with a reseller plan. Data type: none.

 

 

Response Packet Structure

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

  • The result node is required. It wraps the response retrieved from the server. Data type: ResellerTemplateOutputResulttype (reseller_template.xsd).
    • The status node is required. It specifies the execution status of the get operation. Data type: result_status (common.xsd). Allowed values: ok|error.
    • The errcode node is required if the get operation fails. It returns the error code. Data type: unsignedInt.
    • The errtext node is required if the get operation fails. It returns the error message. Data type: string.
    • The id node is required if the get operation succeeds, or if the results are filtered by ID. It returns ID of the reseller plan which settings are retrieved in the result node. Data type: integer.
    • The name node is required if the get operation succeeds, or if the results are filtered by name. It returns the name of the reseller plan which settings are retrieved in the result node. Data type: string.
    • The guid node is required if the get operation succeeds. It returns the reseller plan GUID. Data type: string.
    • The problems node is optional. It contains the description of problems occurred on the operation execution. Data type: string.
    • The limits node is required if the request get packet specifies the limits node and the operation succeeds. Data type: resellerLimits (reseller.xsd). To view the structure of this node, refer to the Limits section.
    • The permissions node is required if the request get packet specifies the permissions node and the operation succeeds. Data type: clientPerms (plesk_client.xsd). To view the structure of this node, refer to the Permissions section.
    • The ip-pool node is required if the request get packet specifies the ip-pool node and the operation succeeds. Data type: ResellerTemplateIpPoolType (reseller_template.xsd). To view the structure of this node, refer to the IP Pool Settings section.
 

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>