• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Resolved Plesk XML API

Deepak Sharma

New Pleskian
Hi,

I am using Plesk XML API to automate Virtual Directory creation for a subdomain xyz.mydomain.com and request packet structure is as below.

<?xml version="1.0" encoding="utf-8" ?>
<packet>
<virtdir>
<create>
<site-id>27</site-id>
<name>/vd1</name>
<properties/>
</create>
</virtdir>
</packet>

I am getting error which error code is 1015 and error description says "Virtual host does not exist"

xyz.mydomain.com has dedicated IP assigned.

I tried with adding an entry in \etc\hosts file that map the IP address to above host name. No luck.

Any help is much appreciated.
 
Error message 1015 means - Parent site/subdomain is not found.
Are you sure that site-id=27 is correct?
 
I am assuming this is ID that we found from this location
IIS >> Advanced Settings of site >> ID property under General section
 
You can find correct site-id in Plesk database with following SQL query:

mysql> select id from domains where name='xyz.mydomain.com';
 
Thanks for your help.

There is an option to create a new database in Plesk but that is specific to site under which we are creating and its completely blank. No default structure or table in it.
Doesn't Plesk maintain a common database that used to store information from all domains?
 
IgorG,

Finally, I got a way to obtain Information about all sites using request packet as below

<packet>
<webspace>
<get>
<filter/>
<dataset>
<hosting/>
</dataset>
</get>
</webspace>
</packet>

This gives me Pesk's Site ID for each Primary domain. For non-primary domain, need to replace <webspace> with <site>

Thanks a lot for your help and suggestion.
 
Back
Top