Changing Subdomain Settings

The set operation is used to change subdomain hosting settings. You can change all settings of a subdomain at once or specify particular settings.

 

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet updating a subdomain hosting settings includes the set operation node:

<packet>
<subdomain>
   <set>
   ...
   </set>
</subdomain>
</packet>

 

The set node is presented by the SubdomainSetInputType (subdomain.xsd). Its graphical representation is as follows:

SubdomainSetInputType

Important: 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 output XML packet is structured as follows:

SubdomainSetO

 

Possible Errors

 

 

Samples

Changing particular settings of a single subdomain on Linux hosting

This packet changes the home directory for forum.example.com.

<packet>
<subdomain>
<set>
   <filter>
      <name>forum.example.com</name>
   </filter>
   <property>
      <name>www_root</name>
      <value>/sample2</value>
   </property>
</set>
</subdomain>
</packet>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
  <subdomain>
    <set>
      <result>
        <status>ok</status>
        <filter-id>forum.example.com</filter-id>
        <id>3</id>
      </result>
    </set>
  </subdomain>
</packet>

Changing settings of multiple subdomains

This packet sets Perl and Miva support for all subdomains on the site example.com.

<packet>
<subdomain>
<set>
   <filter>
      <parent-name>example.com</parent-name>
   </filter>
   <property>
      <name>perl</name>
      <value>true</value>
   </property>
      </set>
</subdomain>
</packet>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
  <subdomain>
    <set>
      <result>
        <status>ok</status>
        <filter-id>example.com</filter-id>
        <id>3</id>
      </result>
    </set>
  </subdomain>
</packet>