• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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