Configuring Site Settings
The set operation lets you change settings of specified sites.
Request Packet Structure
A request XML packet that changes site settings should include the set operation node:
<packet>
<site>
<set>
...
</set>
</site>
</packet>
The set node does not have a separate type, it is nested within the
complex type (site.xsd
). The set node has the following graphics
representation:
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.
-
filter, required
It indicates sites to be updated with the specified information. Data type: siteFilterType (
site.xsd
). To see the structure of this node, proceed to section Available Filters . -
values, required
It contains a collection of settings that will be set for the filtered sites. Data type: none.
-
gen_setup, optional
It specifies a collection of general site settings that will be set for the filtered sites. Data type: setSiteGenSetupType (
site.xsd
). To see the structure of this node, proceed to section Node set/gen_setup. -
prefs, optional
It specifies a collection of preferences for the filtered sites. Data type: domainPrefs (
plesk_domain.xsd
). To see the structure of this node, proceed to section Site Preferences. -
hosting, optional
It specifies hosting settings for the filtered sites. Data type: siteHostingAgentSet (
site.xsd
). To see the structure of this node, proceed to section Hosting. -
disk_usage, optional
It specifies the amount of disk space allotted for email boxes and mailing lists on the filtered sites. Data type: none. To see the structure of this node, proceed to section Disk Space Usage.
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:
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 optional. It wraps the result of the
requested operation. It can be missing if some error occurs before
the validation starts. Data type: resultFilterType
(
common.xsd
). - The status node is required. It returns the execution status of the operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. It is used to return the error code if the operation fails. Data type: unsignedInt.
- The errtext node is optional. Can be used to return an error message if the operation fails. Data type: string.
- The filter-id node is optional. If supported, it is always present and used to return the filtering rule set in the request packet. Data type: anySimple.
- The id node is optional. It is missing if the request packet fails before the validation on the server side. If present, this node identifies the site whose settings are updated. Data type: integer.
Samples
Below is an example of a request packet which sets hosting properties for the domain sample3.tst (Windows hosting):
<packet>
<site>
<set>
<filter>
<name>sample3.tst</name>
</filter>
<values>
<hosting>
<vrt_hst>
<property>
<name>fp</name>
<value>false</value>
</property>
<property>
<name>fp_ssl</name>
<value>false</value>
</property>
<property>
<name>fp_auth</name>
<value></value>
</property>
<property>
<name>fp_admin_login</name>
<value></value>
</property>
<property>
<name>fp_admin_password</name>
<value></value>
</property>
<property>
<name>ssl</name>
<value>true</value>
</property>
<property>
<name>php</name>
<value>true</value>
</property>
<property>
<name>php_handler_id</name>
<value>fastcgi</value>
</property>
<property>
<name>ssi</name>
<value>false</value>
</property>
<property>
<name>cgi</name>
<value>true</value>
</property>
<property>
<name>perl</name>
<value>true</value>
</property>
<property>
<name>asp</name>
<value>false</value>
</property>
<property>
<name>asp_dot_net</name>
<value>false</value>
</property>
<property>
<name>webstat</name>
<value>awstats</value>
</property>
<property>
<name>webstat_protected</name>
<value>true</value>
</property>
<property>
<name>errdocs</name>
<value>false</value>
</property>
<property>
<name>php_version</name>
<value>5.3</value>
</property>
<property>
<name>webdeploy</name>
<value>false</value>
</property>
<property>
<name>www_root</name>
<value>/sample4</value>
</property>
</vrt_hst>
</hosting>
</values>
</set>
</site>
</packet>
Below is an example of a request packet which turns off proxy mode for nginx on the domain sample3.tst (Linux hosting):
<packet>
<site>
<set>
<filter>
<name>sample3.tst</name>
</filter>
<values>
<hosting>
<vrt_hst>
<property>
<name>nginx-proxy-mode</name>
<value>false</value>
</property>
</vrt_hst>
</hosting>
</values>
</set>
</site>
</packet>
Response:
<packet version="1.6.3.0">
<site>
<set>
<result>
<status>ok</status>
<filter-id>18</filter-id>
<id>18</id>
</result>
</set>
</site>
</packet>