The set operation is used to update service plan settings.
A request XML packet adjusting service plan settings includes the set operation node:
<packet>
<service-plan>
<set>
...
</set>
</service-plan>
</packet>
Important: When you update plan settings, all the associated unlocked subscriptions are automatically updated.
The set node is presented by type DomainTemplateSetInputType (domain_template.xsd
). Its graphical representation is as follows:
domain_template.xsd
). plesk_mailname.xsd
). See the structure of this node in the Mailing settings section. plesk_domain.xsd
). See the structure of this node in the Limits section.domain_template.xsd
). See the structure of this node in the Log rotation settings section. domain_template.xsd
). See the structure of this node in the Preferences section. domain_template.xsd
). See the structure of this node in the Hosting settings section.plesk_domain.xsd
).See the structure of this node in the Performance settings section.domain_template.xsd
). See the section PHP Settings for details.domain_template.xsd
). See the section Web Server Settings for details.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
The set node of the output XML packet is of type DomainTemplateSetOutputType (domain_template.xsd
) which is structured as follows:
common.xsd
). This request packet updates two service plans specified by ID.
<packet version="1.6.3.0">
<service-plan>
<set>
<filter>
<id>11</id>
<id>12</id>
</filter>
<mail>
<webmail>false</webmail>
</mail>
</set>
</service-plan>
</packet>
Response:
<packet version="1.6.3.0">
<service-plan>
<set>
<result>
<status>ok</status>
<id>11</id>
</result>
<result>
<status>ok</status>
<id>12</id>
</result>
</set>
</service-plan>
</packet>
To update settings of update only plans of a particular reseller, specify their ID or username.
<packet>
<service-plan>
<set>
<filter>
<name>base_plan</name>
</filter>
<owner-login>JDoe</owner-login>
<mail>
<webmail>true</webmail>
</mail>
</set>
</service-plan>
</packet>
If you are authorized as the Administrator, you can omit the reseller details:
<packet>
<service-plan>
<set>
<filter>
<name>base_plan</name>
</filter>
<mail>
<webmail>true</webmail>
</mail>
</set>
</service-plan>
</packet>
Here is the sample packet that sets similar service plan settings for two different service plans, both specified by ID.
<packet>
<service-plan>
<set>
<filter>
<id>11</id>
<id>12</id>
</filter>
<mail>
<webmail>true</webmail>
</mail>
</set>
</service-plan>
</packet>
To set different settings for two service plans, use two different set operations:
<packet>
<service-plan>
<set>
<filter>
<id>12</id>
</filter>
<owner-login>JDoe</owner-login>
<mail>
<webmail>false</webmail>
</mail>
</set>
<set>
<filter>
<name>base_plan</name>
</filter>
<mail>
<webmail>true</webmail>
</mail>
</set>
</service-plan>
</packet>
The following packet updates all service plans that belong to the request packet sender:
<packet>
<service-plan>
<set>
<filter/>
<mail>
<webmail>false</webmail>
</mail>
</set></service-plan>
</packet>
The following packet updates mail settings for plan bounce_plan:
<packet>
<service-plan>
<set>
<filter>
<name>bounce_plan</name>
</filter>
<mail>
<nonexistent-user>
<reject/>
</nonexistent-user>
<webmail>none</webmail>
</mail>
</set>
</service-plan>
</packet>
The following packet updates limits of a plan:
<packet>
<service-plan>
<set>
<filter>
<id>12</id>
</filter>
<limits>
<limit>
<name>disk_space</name>
<value>10737418240</value>
</limit>
</limits>
</set>
</service-plan>
</packet>
To disable log rotation for the plan with ID 12, use the following packet:
<packet>
<service-plan>
<set>
<filter>
<id>12</id>
</filter>
<log-rotation>
<off/>
</log-rotation>
</set>
</service-plan>
</packet>
The following packet updates preferences for the plan with ID 12:
<packet>
<service-plan>
<set>
<filter>
<id>12</id>
</filter>
<preferences>
<stat>3</stat>
<maillists>false</maillists>
<dns_zone_type>master</dns_zone_type>
</preferences>
</set>
</service-plan>
</packet>
This packet updates physical hosting settings for the plan with ID 12.
<packet>
<service-plan>
<set>
<filter>
<id>12</id>
</filter>
<hosting>
<vrt_hst>
<property>
<name>ssl</name>
<value>true</value>
</property>
</vrt_hst>
</hosting>
</set>
</service-plan>
</packet>
Here is the sample packet that updates performance settings for the plan with ID 12.
<packet>
<service-plan>
<set>
<filter>
<id>12</id>
</filter>
<performance>
<bandwidth>1000</bandwidth>
<max_connections>20</max_connections>
</performance>
</set>
</service-plan>
</packet>