• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

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