• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

API for subdomains

JuanCar

Regular Pleskian
My system is plesk 10.1 on Linux
I've try to create a subdomain following API RPC references and...
1. Script can't creae an FTP for user who own this subdomain
2. Script can create folder on subdomains/<nameofsubdomain>/hpttpdocs using www-root property

What I want is to create a subdomain, the root of this subdomain must be in <domain</subdomains/<nameofsubdomain>httpdocs and there must be an FTP account to access this folder (and only this folder)
I can make this in Plesk Panel but I want to create usin API (unatended)

Is there any fix to those errors?

Ah, my XML
<?xml version='1.0' encoding='utf-8'?>
<packet version='1.6.2.0'>
<subdomain>
<add>
<parent>".$dominio."</parent>
<name>".$sitio."</name>
<property>
<name>ftp_login</name>
<value>".$sitio."</value>
</property>
<property>
<name>ftp_password</name>
<value>".$passSitio."</value>
</property>
<property>
<name>asp</name>
<value>false</value>
</property>
<property>
<name>ssi</name>
<value>false</value>
</property>
<property>
<name>php</name>
<value>false</value>
</property>
<property>
<name>cgi</name>
<value>false</value>
</property>
<property>
<name>perl</name>
<value>false</value>
</property>
<property>
<name>python</name>
<value>false</value>
</property>
<property>
<name>coldfusion</name>
<value>false</value>
</property>
<property>
<name>fastcgi</name>
<value>false</value>
</property>
<property>
<name>miva</name>
<value>false</value>
</property>
<property>
<name>ssl</name>
<value>false</value>
</property>
<property>
<name>same_ssl</name>
<value>false</value>
</property>
<property>
<name>www_root</name>
<value>/subdomains/".$sitio."/httpdocs</value>
</property>
</add>
</subdomain>
</packet>

($sitio, $passSito and so are variables from php and they are correct)
Thanks
 
No

This is good for Windows but I need a solution for linux.
I'll try use events. When a subdomain is created Plesk throws event 39, I link a script to create the FTP.
It's tricky, but it's the only way I found.

Thanks
 
I think you can try this call for Unix too. This feature has been originally introduced for Windows, but since 10.0 shall be available for both Unix and Windows. Let me know if the call doesn't work and meanwhile I will check with developers.

Regards
 
Api ftp

Is there any fix for that bug in 10.4.4?
I think it's not unusual to create a FTP account when a subdomain is created, so you can have a user to manage just this subdomain, and without access to other subdomains.

I wait for an answer.

Thanks

Ops, I've found that this fix is in the las update of API.

Thanks
 
Last edited:
Back
Top