• 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.

Important questions regarding the RPC RPI

L

lonnie

Guest
I'm having some issues using PHP and the XML RPC protocol..

I can get a client created and I can add a new domain if I specify all the limits and hosting settings MANUALLY, but what we're trying to accomplish is migrating a bunch of customers from another hosting service to our plesk servers.. We've created domain templates that have our different levels of service defined, these templates match up with the previous hosting environment...

When I specify a "template-id" or "template-name" tag, the XML call goes through without error, but NONE of the template settings are applied at all..

The only thing I'm setting in the vrt_hst block is the ip address and ftp login information, if I supply ANYTHING less I start getting an error saying that the field "login" is blank.

Now to show you some of what I'm sending.. (replacing some of the info with bogus info naturally)

Code:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<packet version="1.4.1.1">

<domain>
<add>
<gen_setup>
     <name>test.com</name>
     <client_id>122</client_id>
     <htype>vrt_hst</htype>
     <ip_address>192.168.0.55</ip_address>
</gen_setup>

<hosting>
     <vrt_hst>
        <ftp_login>somelogin</ftp_login>
        <ftp_password>somepassword</ftp_password>
        <ip_address>192.168.0.55</ip_address>
     </vrt_hst>
</hosting>

<template-name>Standard</template-name>

</add>
</domain>
</packet>

When I send this packet, I get the following response

Code:
<packet version="1.4.1.1">
<domain>
<add>
<result>
   <status>ok</status>
   <id>48</id>
</result>
</add>
</domain>
</packet>

Yet, none of the settings contained in the "Standard" template have been set for this new domain account, everything is "unlimited", none of the options are applied whatsoever.. I've tried replacing template-name with template-id and then providing the ID number of the template, this makes no difference.

Can ANYONE help?
 
The code you provided looks ok. I've been battling the Plesk api for about 8 weeks now and have put the templates to rest. After contacting support about templates on numerous occasions, they informed me that functionality for an update or "set" on a template based domain is not possible as of Plesk 8.0. Also, when I performed a "get" request to extract template settings, nothing was returned from plesk - no response. The easiest thing for you may be what I did; just specify all parameters in your xml request when creating the domain. Good luck.
 
Back
Top