• 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

Any sample code for web service to access plesk

K

kclo

Guest
Hi all,

I got the Plesk API document for using XML RPC to access Plesk for domain creation and other admin functions. The document include description for the request packet structure. Is there any sample code for using this XML RPC call?

Thanks
 
Yes, I got this document. Suppose I want to write a webpage on my webserver to create a domain through this XML/RPC to plesk server, any sample code for it? The sample code can be for jsp , php, perl.
 
Do you mean this doc? There are a lot of different samples.

Yes. I have this document. If I want to write a web page on my web server(support php, jsp, perl), any sample code to show how to create a domain on Plesk server through xmlrpc.

What is the URL or port number of the XMLRPC server who listen to the request from my XML/RPC client? Is it https://<IP:8443> ? How to handle login authentication in the XML/RPC call.

Sorry that I am new to XML/RPC
 
Hi,

Do you have a sample request packet for changing the domain ftp password?

I only found domain creation packet from the document

Thanks!
 
Hi,

Do you have a sample request packet for changing the domain ftp password?

I only found domain creation packet from the document

Thanks!

If you have not found it in the documentation, it means that this possibility is not present.
 
I found the Set Packet type which can modify domain parameters. I have set the following parameters and it works.

<packet version="1.4.2.0">
<domain>
<set>
<filter>
<domain_name>abc.com</domain_name>
</filter>
<values>
<performance>
<bandwidth>100</bandwidth>
</performance>
</values>
</set>
</domain>

The problem is that the ftp account and password is located under

<hosting>
<vrt_hst>
<ftp_login>abcftp</ftp_login>
<ftp_password>pass</ftp_password>
</vrt_hst>
</hosting>

How can I put them under this "set" packet?
 
What about:

<packet version="1.4.1.0">
<domain>
<add>
<gen_setup>
<name>testdomain.tld</name>
<client_id>1</client_id>
<ip_address>10.55.62.14</ip_address>
<status>0</status>
</gen_setup>
<hosting>
<vrt_hst>
<ftp_login>testftp</ftp_login>
<ftp_password>123qwe</ftp_password>
<ip_address>10.55.62.14</ip_address>
</vrt_hst>
</hosting>
<template-name>test template</template-name>
</add>
</domain>
</packet>
 
I have found out the structure

<packet version="1.4.2.0">
<domain>
<set>
<filter>
<domain_name>abc.com</domain_name>
</filter>
<values>
<hosting>
<vrt_hst>
<ftp_login>bbiiiiii</ftp_login>
<ftp_password>password1</ftp_password>
<ip_address>1.2.3.4</ip_address>
</vrt_hst>
</hosting>
</values>
</set>
</domain>

It needs to be included under <values> and include ip_address as it is required field
</packet>
EOF;
 
Back
Top