TaiNgDinh / ovz-web-panel

Automatically exported from code.google.com/p/ovz-web-panel
0 stars 0 forks source link

Problem with API #423

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello,

I try to use the API. I setup some commands like User Creation. It's ok.

But now, I try to create a VPS.
Here's my request :

/api/virtual_servers/create&hardware_server_id=8&identity=7239&orig_os_template=
debian-6.0-x86_64&orig_server_template=basic&ip_address=88.X.Y.Z&host_name=testv
ps&password=A0W7chYb&user_id=188&diskspace=120000&memory=4096&cpu_units=230640&c
pus=3&cpu_limit=25&expiration_date=2012.05.14&nameserver=88.191.254.60&start_on_
boot=true

And it doesn't work. I've in response a XML Page (the homepage of the panel)
Maybe it's because the URL is too long. But how can I reduce ? =O I pass all my 
parameters.
I dont know too if its "&start_on_boot=true" or "&start_on_boot=1"
And don't know if I have to replace all the "." to "%2E" ?

Thanks !

Original issue reported on code.google.com by menthe.a...@gmail.com on 14 Apr 2012 at 6:03

GoogleCodeExporter commented 8 years ago
Hello.

Remotivated myself. Have to escape "." to "%2E" and it's "true".
No problem with the read limit of 255 chars in an URL.

Thanks & Sorry

Original comment by menthe.a...@gmail.com on 14 Apr 2012 at 6:15

GoogleCodeExporter commented 8 years ago
Question mark was missed after "create". Should something like 
"/api/virtual_servers/create?hardware_server_id=8&identity=7239&orig_os_template
=debian-6.0-x86_64..."

Original comment by sibprogrammer on 16 Apr 2012 at 12:27