Getting Information on Add-on Plans

The get operation is used to retrieve the information about the add-on plans. The operation returns all settings in bulk. You cannot request for a definite group of settings. For instance, you cannot retrieve only hosting settings. All settings are optional and can be missing.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet that requests information about the specified add-on plans includes the get operation node:

<packet>
<service-plan-addon>
   <get>
   ...
   </get>
</service-plan-addon>
</packet>

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

service-plan-addon-get-rps.gif

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 serves to specify the criteria by which the necessary add-on plans will be selected. Data type: DomainTemplateFilterType (domain_template.xsd). See the Available Filters section for details on this node.
  • The owner-id node is optional. It specifies the ID of the add-on plan owner (Administrator, reseller). Data type: integer.
  • The owner-login node is optional. It specifies the login name of the add-on plan owner (Administrator, reseller). Data type: string.

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 output XML packet is of type DomainAddonTemplateGetOutputType (domain_addon_template.xsd) which has the following presentation:

service-plan-addon-get-reps.gif

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 information for one add-on plan. Data type: resultType (common.xsd).
  • The status node is required. Specifies the execution status of the get operation. Data type: result_status (string). Allowed values: ok | error.
  • The errcode node is optional. Is required if the operation fails. Returns the error code. Data type: unsignedInt.
  • The errtext node is optional. Returns the error message. Data type: string.
  • The id node is optional. If the request packet fails before the execution, this node is missing in the response packet. In all other cases it holds the identifier of the add-on plan (if this id was specified in the request packet). Data type: integer.
  • The name node is optional. If the request packet fails before the execution, this node is missing in the response packet. In all other cases it holds the name of the add-on plan (if this name was specified in the request packet). Data type: string.
  • The guid node is optional. It holds the GUID of the add-on plan. Data type: string.
  • The external-id node is optional. It holds the ID of the add-on plan in the Panel components (for example, Business Manager). Data type: string.
  • The limits node is optional. Is present if the operation succeeds and limits are defined for this add-on plan, otherwise it is not present in the packet. Data type: domainLimits (plesk_domains.xsd). See the structure of this node in the Limits section.
  • The hosting node is optional. Is present if the operation succeeds and physical hosting settings are defined for this add-on plan, otherwise is missing in the packet. Data type: DomainTemplatePHosting (domain_templates.xsd). See the structure of this node in the Hosting Settings section.
  • The performance node is optional. This node is present if the operation succeeds and performance settings are defined for this add-on plan, otherwise it is missing in the packet. Data type: DomainPerformanceType (plesk_domain.xsd). See the structure of this node in the Performance Settings section.
  • The permissions node is optional. It defines which services and privileges that can be enabled in an add-on plan. Data type: none. See the structure of this node in the Permissions section.

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.

 

Samples

Getting add-on plans that belong to reseller

To get the information about an add-on plan that belongs to a reseller, specify their ID or login.

<packet>
<service-plan-addon>
<get>
   <filter>
      <name>base_plan</name>
   </filter>
   <owner-id>1</owner-id>
</get>
</service-plan-addon>
</packet>

 Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
  <service-plan-addon>
    <get>
      <result>
        <status>ok</status>
        <id>11</id>
        <name>base_plan</name>
        <guid>befbe7ca-1c78-cfbb-2eaf-debf4cce4896</guid>
        <external-id/>
        <owner-login>admin</owner-login>
        <limits>
          <limit>
            <name>max_site</name>
            <value>0</value>
          </limit>
          ...
        </limits>
        <hosting>
          <vrt_hst>
            <property>
              <name>ssl</name>
              <value>true</value>
            </property>
            <property>
              ...
          </vrt_hst>
        </hosting>
        <performance>
          <bandwidth>-1</bandwidth>
          <max_connections>-1</max_connections>
        </performance>
        <packages/>
        <permissions>
          <permission>
            <name>manage_phosting_ssi</name>
            <value>true</value>
          </permission>
          ...
        </permissions>
        <php-settings>
          <setting>
            <name>safe_mode</name>
            <value>off</value>
          </setting>
          ...
        </php-settings>
      </result>
    </get>
  </service-plan-addon>
</packet>
Getting add-on plans that belong to the Administrator

Omit the reseller identifiers to get information on behalf of the Administrator:

<packet>
<service-plan-addon>
<get>
   <filter>
      <name>base_plan</name>
   </filter>
</get>
</service-plan-addon>
</packet>

 Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
  <service-plan-addon>
    <get>
      <result>
        <status>ok</status>
        <id>11</id>
        <name>base_plan</name>
        <guid>befbe7ca-1c78-cfbb-2eaf-debf4cce4896</guid>
        <external-id/>
        <owner-login>admin</owner-login>
        <limits>
          <limit>
            <name>max_site</name>
            <value>0</value>
          </limit>
          ...
        </limits>
        <hosting>
          <vrt_hst>
            <property>
              <name>ssl</name>
              <value>true</value>
            </property>
            <property>
              ...
          </vrt_hst>
        </hosting>
        <performance>
          <bandwidth>-1</bandwidth>
          <max_connections>-1</max_connections>
        </performance>
        <packages/>
        <permissions>
          <permission>
            <name>manage_phosting_ssi</name>
            <value>true</value>
          </permission>
          ...
        </permissions>
        <php-settings>
          <setting>
            <name>safe_mode</name>
            <value>off</value>
          </setting>
          ...
        </php-settings>
      </result>
    </get>
  </service-plan-addon>
</packet>
Operating multiple add-on plans

A single filter can specify multiple plan instances, all specified either by ID or by the plan name.

<packet>
<service-plan-addon>
<get>
   <filter>
      <name>first_plan</name>
      <name>second_plan</name>
   </filter>
</get>
</service-plan-addon>
</packet> 

Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
  <service-plan-addon>
    <get>
      <result>
        <status>ok</status>
        <id>13</id>
        <name>first_plan</name>
        <guid>a2c68e48-982a-1807-c2fb-3708bca41836</guid>
        <external-id/>
        <owner-login>admin</owner-login>
...
</result>
      <result>
        <status>ok</status>
        <id>14</id>
        <name>second_plan</name>
        <guid>ccede5cd-3ca3-1db9-f46d-aca67beea2b5</guid>
        <external-id/>
        <owner-login>admin</owner-login>
...
 </result>
    </get>
  </service-plan-addon>
</packet>
Getting information about all add-on plans that belong to a reseller

The following packet gets the information about all add-on plans that belong to reseller technolux:

<packet>
<service-plan-addon>
<get>
   <filter/>
   <owner-login>tecnhnolux</owner-login>
</get>
</service-plan-addon>
</packet>

Response:

 <?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
  <service-plan-addon>
    <get>
      <result>
        <status>ok</status>
        <id>9</id>
        <name>Presence Builder</name>
        <guid>4098eff5-418f-c6b5-eaae-e2ffa15b8024</guid>
        <external-id/>
        <owner-id>2</owner-id>
...

</result>
    </get>
  </service-plan-addon>
</packet>
Getting information about all add-on plans that belong to a requester

The following packet gets the information about all add-on plans that belongs to a requester:

<packet>
<service-plan-addon>
<get>
   <filter/>
</get>
</service-plan-addon>
</packet>

 Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
  <service-plan-addon>
    <get>
      <result>
        <status>ok</status>
        <id>10</id>
        <name>base_plan</name>
        <guid>7f595c10-9759-48d5-8b83-69080acc7b74</guid>
        <external-id/>
        <owner-login>admin</owner-login>
...

</result>
    </get>
  </service-plan-addon>
</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.