• Inviting everyone who uses WordPress management tools in Plesk
    The Plesk team is conducting a 60-minute research session that includes an interview and a moderated usability test.
    To participate, please use this link .
    Your experience will help shape product decisions and ensure the tools better support real-world use cases.

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