Removing Available Database Servers

The remove operation is used to remove a database from 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 removing a database from the list of databases available to the plan subscribers includes the remove operation node:

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

 

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

db-servers-remove

  • The filter node is required. It serves to specify the criteria by which the necessary service plans will be selected from the database. Data type: DomainTemplateFilterType (domain_template.xsd). See the Available Filters section for details on this node.
  • The db-server node is required. It specifies the database server that will be removed from the list of available database servers. Data type: dbServerInput.
  • The type node is required. It specifies the type of the database server. Data type: string.
  • The id node is optional. It specifies the ID of the database server. Data type: string.
  • The host node is optional. It specifies the host name of the database server. Data type: string.
  • The port node is optional. It specifies the port on which the database server is available. Data type: string.

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

 
Response Packet Structure

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

db-servers-remove-response

  • The result node is required. It wraps the response got from the server. Data type: resultFilterType (common.xsd).
  • The status node is required. Specifies the execution status of the operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. Returns the error code when the operation fails. Data type: unsignedInt.
  • The errtext node is optional. Returns the error message if the operation fails. Data type: string.
  • The filter-id node is optional. Returns the parameter by which the service plan was filtered by in the request packet. Data type: anySimple.
  • The id node is optional. Returns the identifier of the service plan to which the application was added. Data type: id_type (common.xsd).
 
Samples

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

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

Response:

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

Leave your comments on this page

Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.