• 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

Plesk API

D

Dimitry

Guest
Hello,
Can someone give me XML example how to associate Domain Template with created Domain?

Sorry, solution found.
 
Would you care to post the solution so that others may find out what it was?
 
<packet version="1.4.1.0">
<domain>
<add>
<gen_setup>
<name>www.mydomain.com</name>
<client_id>%ID OF CLIENT%</client_id>
<htype>vrt_hst</htype>
<ip_address>1.1.1.1</ip_address>
<status>16</status>
</gen_setup>
<hosting>
<vrt_hst>
<ftp_login>ftpuser123</ftp_login>
<ftp_password>123456</ftp_password>
<ip_address>1.1.1.1</ip_address>
</vrt_hst>
</hosting>
<user>
<enabled>true</enabled>
<password>PASSWORD</password>
<pname>PNAME</pname>
<email>EMAIL</email>
<multiply_login>false</multiply_login>
<cname/>
<phone/>
<fax/>
<address/>
<city/>
<state/>
<pcode/>
<country/>
</user>
<template-name>SMSHostingTemplate</template-name>
</add>
</domain>
</packet>

And also not template_id but template-id

There are some mistakes in Plesk documentation... hate this!
 
Error when using example

Dimitry,

Thank you for the example. Unfortunately I received the same error as I've been getting all day:

Unable to update hosting preferences. hosting update failed: cObject->update() failed: Some fields are empty or contain an improper value: 'fp_adm' = , 'fp_pass' = . Incorrect fields: "fp_adm","fp_pass".

It sounds like plesk is saying incorrect field names are being passed in: fp_adm and fp_pass, but I'm not even passing them in and I don't see these field names specified in the documentation. Any ideas? Also, were you able to successfully apply a domain template?
Thank you
 
Solution

It was a misconfiguration with the domain template that was specified in plesk. "Frontpage Support" was checked, but "Frontpage Authoring" was disabled. Enable or disable both.
 
Back
Top