Use the get-supported-types operation to retrieve the supported types of database.

Request Packet Structure

A request XML packet retrieving types of database servers supported by Plesk includes the get-supported-types operation node:

<packet>
    <db_server>
        <get-supported-types/>
    </db_server>
</packet>

The graphical representation of the get-supported-types node is as follows:

image 37597

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.

Response Packet Structure

The get-supported-types node of the output XML packet is structured as follows:

image 37598

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 required. It wraps the response retrieved from the server. Data type: DatabaseServerResultType (database_output.xsd).
  • The status node is required. It specifies the execution status of the get-supported-types operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. Is returns the error code if the get-supported-types operation fails. Data type: integer.
  • The errtext node is optional. It returns the error message if the get-supported-types operation fails. Data type: string.
  • The type node is optional. It returns the types of supported database servers if the get-supported-types operation succeeds. Data type: string.

Samples

This request packet retrieves the supported types of database servers.

<packet version="1.5.2.0">
    <db_server>
        <get-supported-types/>
    </db_server>
</packet>

(Plesk for Linux) Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.5.2.0">
    <db_server>
        <get-supported-types>
            <result>
                <status>ok</status>
                <type>mysql</type>
                <type>postgresql</type>
            </result>
        </get-supported-types>
    </db_server>
</packet>

(Plesk for Windows) Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.5.2.0">
    <db_server>
        <get-supported-types>
            <result>
                <status>ok</status>
                <type>mssql</type>
                <type>mysql</type>
            </result>
        </get-supported-types>
    </db_server>
</packet>