Retrieving Information on Reseller Accounts

The get operation is used to retrieve information on reseller account settings. 

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

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

<packet>
<reseller>
   <get>
   ...
   </get>
</reseller>
</packet>

 

The get node is presented by the ResellerGetInput type (reseller.xsd). Its graphical representation is as follows:

Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_input.svg.

  • The filter node is required. It specifies the filtering rule. Data type: ResellerSelectionFilter. For more information on filters, refer to the Available Filters section.
  • The dataset node is required. It specifies categories of settings requested from Plesk database. Data type: ResellerDataset (reseller.xsd).
  • The gen-info node is optional. It is used to request general information on a reseller account. Data type: none.
  • The stat node is optional. It is used to request reseller statistics. Data type: none.
  • The permissions node is optional. It is used to request permissions set for a reseller account. Data type: none.
  • The limits node is optional. It is used to request limits on Plesk resources, and limits policy set for a reseller account. Data type: none.
  • The ippool node is optional. It is used to request IP pool settings for a reseller account. Data type: none.
  • The subscriptions node is optional. It is used to request subscriptions owned by customers of given resellers. Data type: none.

 

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:

ResellerGetOutput

Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_output.svg.

  • The result node is required. It wraps the response retrieved from the server. Data type: resultFilterType (common.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 filter-id node is required. It returns parameter by which the reseller account was filtered in the request packet. Data type: anySimple.
    • The id node is required if the operation succeeds, or if the results are filtered by ID. It returns ID of the reseller account which settings are retrieved in the response packet. Data type: integer.
    • The data node is required if the get operation succeeds. It returns collection of requested reseller account settings. Data type: ResellerData (reseller.xsd). See the structure of this node below.

The data node is structured as follows:

  • The gen-info node is optional. It returns general reseller account settings. Data type: resellerGetGenInfo (reseller.xsd). To view the structure of this node, refer to the Type ResellerGetGenInfo section.
  • The stat node is optional. It returns statistics for a reseller account. Data type: ResellerStatType (reseller.xsd). View the structure of this node below.
  • The permissions node is optional. It returns permissions set for a reseller account. Data type: clientPerms (plesk_client.xsd) . To view the structure of this node, refer to the Permissions section.
  • The limits node is optional. It returns limits on Plesk resources usage and limits policy specified for a reseller account. Data type: ResellerLimits (reseller.xsd).To view the structure of this node, refer to the Limits section.
  • The ippool node is optional. It returns IP pool settings for a reseller account. Data type: ipPoolType (plesk_client.xsd).
  • The subscriptions node is optional. It returns information about subscription statuses and associated plans. To view the structure of this node, refer to the Subscription Statuses and Associated Plans section. Data type: SubscriptionsList (plesk_common.xsd).

The stat node is structured as follows:

  • The active-clients node is required. It specifies the number of active customers owned by a reseller. Data type: unsignedInt. Default value: 0.
  • The active-domains node is required. It specifies the number of active subscriptions owned by a reseller. Data type: unsignedInt. Default value: 0.
  • The subdomains node is required. It specifies the number of subdomains created by a reseller. Data type: unsignedInt. Default value: 0.
  • The domain-aliases node is required. It specifies the number of site aliases created by a reseller. Data type: unsignedInt. Default value: 0.
  • The disk-space node is required. It specifies the amount of disk space occupied by a reseller. Data type: integer. Default value: 0.
  • The web-users node is required. It specifies the number of web users created by a reseller. Data type: unsignedInt. Default value: 0.
  • The data-bases node is required. It specifies the number of databases used by a reseller. Data type: unsignedInt. Default value: 0.
  • The postboxes node is required. It specifies the number of email boxes created by a reseller. Data type: unsignedInt. Default value: 0.
  • The mbox-quota node is required. It specifies the amount of disk space that a single email box can occupy. Data type: unsignedInt. Default value: 0.
  • The redirects node is required. It specifies the number of redirects created by a reseller. Data type: unsignedInt. Default value: 0.
  • The mail-groups node is required. It specifies the number of email groups created by a reseller. Data type: unsignedInt. Default value: 0.
  • The mail-resps node is required. It specifies the number of automatic response messages created by a reseller. Data type: unsignedInt. Default value: 0.
  • The mail-lists node is required. It specifies the number of mailing lists created by a reseller. Data type: unsignedInt. Default value: 0.
  • The webapps node is required. It specifies the number of Tomcat web applications used by a reseller. Data type: unsignedInt. Default value: 0.
  • The traffic node is required. It specifies the amount of traffic (in bytes) spent by a reseller monthly. Data type: integer. Default value: 0.
  • The traffic-prevday node is required. It specifies the amount of traffic (in bytes) spent by a reseller during the previous day. Data type: integer. Default value: 0.
 

Samples

To retrieve information on reseller account, specify the packet as follows:

<packet version="1.6.0.0">
<reseller>
   <get>
      <filter>
          <id>1324</id>
      </filter>
      <dataset>
          <gen-info/>
          <stat/>
          <permissions/>
          <limits/>
          <ippool/>
      </dataset>
   </get>
</reseller>
</packet>

Response:

<packet version="1.6.3.0">
  <reseller>
    <get>
      <result>
        <status>ok</status>
        <filter-id>2</filter-id>
        <id>2</id>
        <data>
	       <subscriptions>
            <subscription>
              <locked>false</locked>
              <synchronized>true</synchronized>
              <plan>
                <plan-guid>b9808ead-875a-c30f-d9bf-eb03ad12c89c</plan-guid>
              </plan>
              <plan>
                <plan-guid>f42428e7-9078-5ed8-50de-fd5ecfb5ecc6</plan-guid>
              </plan>
            </subscription>
          </subscriptions>

        </data>
      </result>
    </get>
  </reseller>
</packet>

To send a similar packet for multiple reseller accounts, use the packet as follows:

<packet version="1.6.0.0">
<reseller>
   <get>
      <filter>
          <id>1324</id>
          <id>1325</id>
      </filter>
      <dataset>
          <gen-info/>
          <stat/>
          <permissions/>
          <limits/>
          <ippool/>
      </dataset>
   </get>
</reseller>
</packet>

 

 

Leave your feedback on this topic here

If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.