• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

API and IPv6

nevakee

Basic Pleskian
API RPC and IPv6

Hi,

How to create webspace via API an IPv4 and IPv6 address specify?

<?xml version="1.0" encoding="UTF-8" ?>
<packet version="1.6.3.0">
<webspace>
<add>
<gen_setup>
<name>domain.tld</name>
<owner-login>login</owner-login>
<htype>vrt_hst</htype>
<ip_address>123.123.123.123</ip_address>
<status>0</status>
</gen_setup>
<hosting>
<vrt_hst>
<property>
<name>ftp_login</name>
<value>login</value>
</property>
<property>
<name>ftp_password</name>
<value>adx23xd2</value>
</property>
<ip_address>123.123.123.123</ip_address>
</vrt_hst>
</hosting>
<plan-name>plan</plan-name>
</add>
</webspace>
</packet>


<ip_address>123.123.123.123, 2000:1234:1234::1</ip_address> ???

<ip_address>123.123.123.123, [2000:1234:1234::1]</ip_address> ???

<ip_address>123.123.123.123</ip_address>
<ip_address>[2000:1234:1234::1]</ip_address> ???
 
Last edited:
You would need to pass two <ip_address> nodes, but square brackets don't seem supported. Please see example below:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.3.4">
<webspace>
<add>
<gen_setup>
<name>example.com</name>
<htype>vrt_hst</htype>
<ip_address>10.52.48.200</ip_address>
<ip_address>2002:5bcc:18fd:c:10:52:48:200</ip_address>
</gen_setup>
<hosting>
<vrt_hst>
<property>
<name>ftp_login</name>
<value>mylogin</value>
</property>
<property>
<name>ftp_password</name>
<value>mypassword</value>
</property>
<ip_address>10.52.48.200</ip_address>
<ip_address>2002:5bcc:18fd:c:10:52:48:200</ip_address>
</vrt_hst>
</hosting>
</add>
</webspace>
</packet>
 
Last edited:
Thank you for your reply, but that does not work.

The subscription is not created.
No errors...


Parallels Plesk Panel v10.4.4_build1013111102.18 os_Debian 6.0
Update #32
 
Well, if you tried to execute my example as is, it might not work indeed - it is just to show <ip_address> usage.
Could you share API request/response?
 
$packet = '<?xml version="1.0" encoding="UTF-8" ?>
<packet version="1.6.3.0">
<webspace>
<add>
<gen_setup>
<name>'.$_POST["domain"].'</name>
<owner-login>'.$_POST["login"].'</owner-login>
<htype>vrt_hst</htype>
<ip_address>10.52.48.200</ip_address>
<ip_address>2002:5bcc:18fd:c:10:52:48:200</ip_address>
<status>0</status>
</gen_setup>
<hosting>
<vrt_hst>
<property>
<name>ftp_login</name>
<value>'.$_POST["login"].'</value>
</property>
<property>
<name>ftp_password</name>
<value>'.$_POST["passwd"].'</value>
</property>
<ip_address>10.52.48.200</ip_address>
<ip_address>2002:5bcc:18fd:c:10:52:48:200</ip_address>
</vrt_hst>
</hosting>
<plan-name>'.$_POST["plan"].'</plan-name>
</add>
</webspace>
</packet>';

The customer is first created. With one IP address it works.
If the version 1.6.3.5, it does not work. Only version 1.6.3.0 work.
 
Yes, with 10.4.4 you can use up to 1.6.3.4 version of API. 1.6.3.5 will be shipped in 11.0, I will correct my previous post to avoid confusion
 
Back
Top