The add operation is used to add a database to the list of database servers available within the subscription.
A request XML packet adding a database to the list of databases available to the plan subscribers includes the add operation node:
<packet>
<webspace>
<db-servers>
<add>
...
</add>
</db-servers>
</webspace>
</packet>
The add node is presented by type WebspaceDbServerInput (webspace.xsd
). Its graphical representation is as follows:
webspace.xsd
). See the Available Filters section for details on this node.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
The add node of the output XML packet is of complex type (webspace.xsd)
which has the following presentation:
common.xsd
). common.xsd
).The following request adds the MySQL database server available on the port 3306 of localhost to the list of database servers available within the subscription with id 1:
<packet>
<webspace>
<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>
</webspace>
</packet>
A positive response got from the server after adding a database server to the list of database servers available within a subscription can look as follows:
<packet>
<webspace>
<db-servers>
<add>
<result>
<status>ok</status>
<filter-id>1</filter-id>
<id>1</id>
</result>
</add>
</db-servers>
</webspace>
</packet