Getting Information on Service Plans

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.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

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:

  • 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.

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 DomainTemplateGetOutputType (domain_template.xsd) which is structured as follows:

  • The result node is required. It wraps the information for one service 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 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 Panel 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_templates.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_templates.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.
 

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>horde</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>

 

 

Leave your comments on this page

Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.