The API-request to add DB fails in Plesk Multi Server: domain does not exist

Created:

2017-06-19 14:39:34 UTC

Modified:

2017-08-16 17:14:10 UTC

0

Was this article helpful?


Have more questions?

Submit a request

The API-request to add DB fails in Plesk Multi Server: domain does not exist

Applicable to:

  • Plesk for Linux
  • Plesk Multi Server

Symptoms

  • The API-request to get hosting settings with webspace node returns the webspace-id of subscription on the management node:

    <packet> 
    <request-settings>
    <setting>
    <name>plesk_rpc_forwarding_to_ext</name>
    <value>plesk-multi-server</value>
    </setting>
    <setting>
    <name>ext-plesk-multi-server:node-id</name>
    <value>1</value>
    </setting>
    </request-settings>
    <webspace>
    <get>
    <filter>
    <name>example.com</name>
    </filter>
    <dataset>
    <hosting/>
    </dataset>
    </get>
    </webspace>
    </packet>
  • As a result, the API-request to add database via specifying webspace-id of subscription fails with the following error:

    API-request:

        <packet> 
    <request-settings>
    <setting>
    <name>plesk_rpc_forwarding_to_ext</name>
    <value>plesk-multi-server</value>
    </setting>
    <setting>
    <name>ext-plesk-multi-server:node-id</name>
    <value>1</value>
    </setting>
    </request-settings>
    <database>
    <add-db>
    <webspace-id>#ID</webspace-id>
    <name>example</name>
    <type>mysql</type>
    </add-db>
    </database>
    </packet>

    API-response:

    <?xml version="1.0" encoding="UTF-8"?>
    <packet version="1.6.9.0">
    <database>
    <add-db>
    <result>
    <status>error</status>
    <errcode>1015</errcode>
    <errtext>domain does not exist</errtext>
    </result>
    </add-db>
    </database>
    </packet>

Cause

This is bug #EXTPMS-1356 , which is considered to be fixed in one of the next Plesk Multi Server Extension updates.

Workaround

Use the following API-request with site node, which will return the webspace-id of subscription on the service node:

    <packet> 
<request-settings>
<setting>
<name>plesk_rpc_forwarding_to_ext</name>
<value>plesk-multi-server</value>
</setting>
<setting>
<name>ext-plesk-multi-server:node-id</name>
<value>1</value>
</setting>
</request-settings>
<site>
<get>
<filter>
<name>example.com</name>
</filter>
<dataset>
<hosting/>
</dataset>
</get>
</site>
</packet>

Additional information

XML API Guide: Getting Information About Subscriptions

XML API Guide: Available Filters

Have more questions? Submit a request
Please sign in to leave a comment.