• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

Add database to Domain via XML API

R

Ryan French

Guest
Hi All,

I am currently implementing a site that integrates with Plesk. I am trying to add/create a database for a domain. To do this I am firstly grabbing the domain-id from Plesk using XML (gen_info node of the reply). When I try and add a database using the guid that is returned, I am getting an error that it is not a valid ID. I know that the ID that is returned is a string GUID, and that the ID that is expected by Plesk is an interger, so I'm just wondering where do I get the domains ID from that I can use for this?

Thanks for any help.
 
What about receiving domain_id with something like:

<packet version="1.6.0.0">
<domain>
<get>
<filter>
<domain-name>example.com</domain-name>
<domain-name>sample.com</domain-name>
</filter>
<dataset>
<hosting/>
</dataset>
</get>
</domain>
</packet>

Also you can find domain_id in browser status bar with putting mouse over domain name in domain's list.
 
Back
Top