Use the get-limit-descriptor operation to retrieve descriptor of subscription limits. For details on descriptors, refer to the Representation of Object Descriptor section. For details on limits of a subscription, refer to the Limits section.

Request Packet Structure

A request XML packet retrieving subscription limits descriptors includes the get-limit-descriptor operation node:

<packet>
<webspace>
   <get-limit-descriptor>
   ...
   </get-limit-descriptor>
</webspace>
</packet>

You can retrieve limits descriptor for the specified subscription (or multiple subscriptions specified by customer ID or login name), or the server-level subscription limits descriptor. The get-limit-descriptor node has the following graphical representation:

image 39976

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 a filtering rule. For info on filters, refer to the Filters of Descriptors section. Data type: domainFilterType (domain_input.xsd).

Response Packet Structure

The get-limit-descriptor node of the output XML packet is structured as follows:

image 40142

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 (plesk_common.xsd).
  • The status node is required. It specifies the execution status of the get-limit-descriptor operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. It is used to return the error code when the get-limit-descriptor operation fails. Data type: unsignedInt.
  • The errtext node is optional. Can be used to return the error message if the get-limit-descriptor operation fails. Data type: string.
  • The filter-id node is optional. It is required if the get-limit-descriptor operation succeeds. Returns either subscription name, subscription ID, customer name, or customer ID depending on a way of descriptor specification in the request packet. For info on filters, refer to the Filters of Descriptors section. Data type: anySimple.
  • The id node is optional. It is required if the get-limit-descriptor operation succeeds. Returns the unique identifier of the subscription. Data type: integer.
  • The descriptor node is optional. It specifies the object descriptor. For details, refer to Representation of Object Descriptor. Data type: string.

Note: This descriptor contains limits extensions. For details, refer to the Extension of Limits Descriptor section.

Samples

The request packet that retrieves the server-level descriptor of subscription limits looks as follows:

<packet>
<webspace>
   <get-limit-descriptor>
      <filter/>
   </get-limit-descriptor>
</webspace>
</packet>

The request packet retrieving limits descriptor for the subscription with ID 1 looks as follows:

<packet version ="1.6.3.0">
<webspace>
   <get-limit-descriptor>
      <filter>
         <id>1</id>
      </filter>
   </get-limit-descriptor>
</webspace>
</packet>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.3.0">
  <webspace>
    <get-limit-descriptor>
      <result>
        <status>ok</status>
        <filter-id>1</filter-id>
        <id>1</id>
        <descriptor>
          <property>
            <name>max_site</name>
            <type>int</type>
            <writable-by>admin</writable-by>
            <label>Domains</label>
            <extension>
              <shared>false</shared>
            </extension>
          </property>
...
          <property>
            <name>cgroups_cpu_usage</name>
            <type>int</type>
            <writable-by>admin</writable-by>
            <label>Maximum CPU usage</label>
            <extension>
              <shared>false</shared>
            </extension>
          </property>
...
        </descriptor>
      </result>
    </get-limit-descriptor>
  </webspace>
</packet>

The request packet retrieving limits descriptor for subscriptions with ID 5 and ID 7 looks as follows:

<packet version ="1.6.3.0">
<webspace>
   <get-limit-descriptor>
      <filter>
         <name>5</name>
         <name>7</name>
      </filter>
   </get-limit-descriptor>
</webspace>
</packet>

The request packet retrieving limits descriptor for subscriptions of the client specified by ID 3 looks as follows:

<packet version ="1.6.3.0">
<webspace>
   <get-limit-descriptor>
      <filter>
         <owner-id>3</owner-id>
      </filter>
   </get-limit-descriptor>
</webspace>
</packet>