The get operation is used to retrieve the information about service 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.

Request Packet Structure

A request XML packet getting information about the specified service plans includes the get operation node:

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

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

image 32916

  • The filter node is required. It serves to specify the criteria by which the necessary service plans will be selected from the database. 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 service plan owner. Data type: integer.
  • The owner-login node is optional. It specifies the login name of the service plan owner. Data type: string.
  • The owner-all node is optional (1.6.3.4 and later). It is used to get information about all service plans regardless of their owner. Data type: none.

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

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.

Response Packet Structure

The get node of the output XML packet is of type DomainTemplateGetOutputType (domain_template.xsd) which is structured as follows:

image 77449

  • The result node is required. It wraps the information for one service plan. Data type: resultType (common.xsd). It contains the following nodes:
    • 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 get 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 service 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 service plan (if this name was specified in the request packet). Data type: string.
  • The guid node is optional. It holds the GUID of the service plan. Data type: string.
  • The external-id node is optional. It holds the ID of the service plan in the Plesk components (for example, Business Manager). Data type: string.
  • The mail node is optional. Is present if the operation succeeds and mail settings are defined for this service plan, otherwise is missing in the packet. Data type: MailPreferences (plesk_mailname.xsd). See the structure of this node in the Mailing settings topic.
  • The limits node is optional. Is present if the operation succeeds and limits are defined for this service plan, otherwise is missing in the packet. Data type: domainLimits (plesk_domains.xsd). See the structure of this node in the Limits topic.
  • The log-rotation node is optional. Is present if the operation succeeds and log rotation settings are defined for this service plan, otherwise is missing in the packet. Data type: LogRotationType (domain_template.xsd). See the structure of this node in the Log rotation settings topic.
  • The preferences node is optional. Is present if the operation succeeds and preferences are defined for this service plan, otherwise is missing in the packet. Data type: DomainTemplatePreferencesType (domain_template.xsd). See the structure of this node in the Preferences topic.
  • The hosting node is optional. Is present if the operation succeeds and physical hosting settings are defined for this service plan, otherwise is missing in the packet. Data type: DomainTemplatePHosting (domain_template.xsd). See the structure of this node in the Hosting settings topic.
  • The performance node is optional. This node is present if the operation succeeds and performance settings are defined for this service plan, otherwise it is missing in the packet. Data type: DomainPerformanceType (plesk_domain.xsd). See the structure of this node in the Performance settings topic.
  • The permissions node is optional. It defines which services and privileges that can be enabled in a service plan. Data type: none. See the structure of this node in the Permissions section.
  • The plan-items node is optional. It defines the additional services provided by Plesk extensions included into the service plan. Data type: none. See the structure of this node in the Additional Services section.
  • The aps-filter node is optional. It defines if the application filter is switched on. The application filter allows to select only the particular applications that will be available in the subscription. Data type: boolean.
  • The packages node is optional. It defines list of available applications if the application filter is switched on. Data type: none. See the structure of this node in the Available Applications section.
  • The php-settings node is optional. It defines custom PHP configuration of the specified subscription. Data type: phpSettings. See the structure of this node in the PHP Settings section.
  • The web-server-settings node is optional. Is present if the operation succeeds and web server settings are defined for this service plan, otherwise it is missing in the packet. Data type: webServerSettings (domain_template.xsd). See the structure of this node in the Web Server Settings topic.

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

This request packet requests for the information about a service plan specified by ID.

<packet version="1.6.3.0">
<service-plan>
<get>
   <filter>
      <id>11</id>
   </filter>
</get>
</service-plan>
</packet>

Response:

<packet version="1.6.3.0">
  <service-plan>
    <get>
      <result>
        <status>ok</status>
        <id>11</id>
        <name>base_plan</name>
        <guid>dea4315c-a1da-2ea7-4142-ddc42d0902f9</guid>
        <external-id/>
        <mail>
          <nonexistent-user>
            <reject/>
          </nonexistent-user>
          <webmail>roundcube</webmail>
        </mail>
        <limits>
          <overuse>notify</overuse>
          <limit>
            <name>max_db</name>
            <value>10</value>
          </limit>
...
     </limits>
        <log-rotation>
          <off/>
        </log-rotation>
        <preferences>
          <stat>0</stat>
          <maillists>false</maillists>
          <dns_zone_type>master</dns_zone_type>
        </preferences>
        <hosting>
          <vrt_hst>
            <property>
              <name>ssl</name>
              <value>true</value>
            </property>
...
          </vrt_hst>
        </hosting>
        <performance>
          <bandwidth>-1</bandwidth>
          <max_connections>-1</max_connections>
        </performance>
        <permissions>
          <permission>
            <name>create_domains</name>
...

          </permission>
        </permissions>
      </result>
    </get>
  </service-plan>
</packet>