Reputation: 854
I was able to create a subdomain in my plesk panel (linux serverm and plesk 10.4.4 ) using API (with a PHP script). But I'm not able to find a documentation online for just two things:
/subdomains/my-subdomain
?Thank you very much...
Upvotes: 1
Views: 1343
Reputation: 3982
Try this one:
HTTP_AUTH_LOGIN: <login here>
HTTP_AUTH_PASSWD: <password here>
Content-Type: text/xml
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.3.4">
<subdomain>
<add>
<parent>parent domain name here</parent>
<name>subdomain name</name>
<property>
<name>ftp_password</name>
<value>qweqwe</value>
</property>
<property>
<name>webstat</name>
<value>awstats</value>
</property>
<property>
<name>www_root</name>
<value>httpdoc</value>
</property>
</add>
</subdomain>
</packet>
In case of set request will be:
HTTP_AUTH_LOGIN: <login here>
HTTP_AUTH_PASSWD: <password here>
Content-Type: text/xml
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.3.4">
<subdomain>
<set>
<filter><id>ID</id></filter>
<property>
<name>webstat</name>
<value>awstats</value>
</property>
<property>
<name>www_root</name>
<value>httpdoc</value>
</property>
</set>
</subdomain>
</packet>
Upvotes: 1