1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Important questions regarding the RPC RPI

Discussion in 'Plesk for Windows - 8.x and Older' started by lonnie, Sep 11, 2006.

  1. lonnie

    lonnie Guest

    0
     
    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?
     
  2. cfnick1

    cfnick1 Guest

    0
     
    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.
     
Loading...