Adding Available Database Servers

The add operation is used to add a database to the list of database servers available to the plan subscribers.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 
Request Packet Structure

A request XML packet adding a database to the list of databases available to the plan subscribers includes the add operation node:

<packet>
<service-plan>
   <db-servers>
	  <add>
	   ...
	  </add>
   </db-servers>
</service-plan>
</packet>

 

The add node is presented by type DomainTemplateDbServerInput (domain_template.xsd). Its graphical representation is as follows:

db-servers-add

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

 
Response Packet Structure

The add node of the output XML packet is of complex type (domain_template.xsd)which has the following presentation:

db-servers-add-response

 
Samples

The following request adds the MySQL database server available on the port 3306 of localhost to the list of database servers available in the service plan with id 1:

 <packet>
  <service-plan>
    <db-servers>
      <add>
        <filter>
          <id>1</id>
        </filter>
        <db-server>
          <type>mysql</type>
          <host>localhost</host>
          <port>3306</port>
        </db-server>
        <db-server>
          <type>postgresql</type>
          <host>localhost</host>
          <port>5432</port>
        </db-server>
      </add>
    </db-servers>
  </service-plan>
</packet>

Response:

<packet>
  <service-plan>
    <db-servers>
      <add>
        <result>
          <status>ok</status>
          <filter-id>1</filter-id>
          <id>1</id>
        </result>
      </add>
    </db-servers>
  </service-plan>
</packet>