The set operation is used to modify reseller account settings.

Request Packet Structure

A request XML packet updating settings for a specified reseller account includes the set operation node:

<packet>
<reseller>
   <set>
   ...
   </set>
</reseller>
</packet>

The set node is presented by the ResellerSetInput complex type (reseller.xsd). Its graphical representation is as follows:

image 63200

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. For more information on filters, refer to the Available Filters section. Data type: ResellerSelectionFilter (reseller.xsd).
  • The values node is required. It specifies categories of settings which are to be modified.
    • The gen-info node is optional. It specifies general information on a reseller account. Data type: ResellerSetGenInfo (reseller.xsd). To view the structure of this node, refer to the Type ResellerSetGenInfo section.
    • The limits node is optional. It specifies limits policy and limits on Plesk resources usage for a reseller. Data type: resellerLimits (reseller.xsd). To view the structure of this node, refer to the Limits section.
    • The permissions node is optional. It specifies a set of reseller permissions. Data type: clientPerms (plesk_client.xsd). To view the structure of this node, refer to the Permissions section.

Note: When creating request packets, put nodes and elements in the order they follow in the packet structure.

Response Packet Structure

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

image 60372

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 set operation. Data type: result_status (common.xsd). Allowed values: ok|error.
    • The errcode node is required if the set operation fails. It returns the error code. Data type: unsignedInt.
    • The errtext node is required if the set 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 which settings were modified. Data type: id_type (common.xsd).

Samples

The following packet updates reseller accounts limits and sets the oversell limits policy for these accounts:

<packet version="1.6.0.2">
<reseller>
   <set>
      <filter>
         <login>JDoe</login>
         <login>RRoe</login>
      </filter>
      <values>
         <limits>
            <resource-policy>
               <oversell>true</oversell>
            </resource-policy>
            <limit>
               <name>disk_space</name>
               <value>209715200</value>
            </limit>
            <limit>
               <name>max_dom</name>
               <value>50</value>
            </limit>
            <limit>
               <name>max_subdom</name>
               <value>250</value>
            </limit>
            <limit>
               <name>max_webapps</name>
               <value>30</value>
            </limit>
            <limit>
               <name>max_traffic</name>
               <value>209715200</value>
            </limit>
            <limit>
               <name>max_db</name>
               <value>30</value>
            </limit>
         </limits>
      </values>
   </set>
</reseller>
</packet>

Response:

<packet version="1.6.0.0">
  <reseller>
    <set>
      <result>
        <status>ok</status>
        <filter-id>JDoe</filter-id>
        <id>2</id>
      </result>
    </set>
  </reseller>
</packet>