Welcome Guest. Please Login or Register  


You are here: Index > Virtualizor - Virtual Server Control Panel > Bugs > Topic : [API BUG] Edit Server



Threaded Mode | Print  

 [API BUG] Edit Server (3 Replies, Read 959 times)
HOSTFLYTE
Group: NOC
Post Group: Newbie
Posts: 6
Status:
Sending an API request to lock the server works just fine using the following POST headers (Variable values have been changed for the example).

PHP Code

 $post = array();
$post['server_name'] = "TEST SERVER";
$post['locked'] = 1;
$post['serid'] = 12;
$post['ip'] = "xx.xx.xx.xx";
$post['sgid'] = 3



However, It will not UNLOCK the server when running these headers.
PHP Code

 $post = array();
$post['server_name'] = "TEST SERVER";
$post['locked'] = 0;
$post['serid'] = 12;
$post['ip'] = "xx.xx.xx.xx";
$post['sgid'] = 3


We're literally just changing the "locked" value to 0, The API says that it has succeeded, but does not update the locked value.
IP: --   

[API BUG] Edit Server
chirag
Group: Virtualizor Team
Post Group: Elite Member
Posts: 340
Status:
Hi,

Sir there is not bug in this API call.

If you want to unlock the server, just do not pass the 'locked' key in array.
It will get unlocked.

Please check and let us know.

-----------------------
Virtualizor - VPS Control Panel
Follow us on Facebook
IP: --   

[API BUG] Edit Server
HOSTFLYTE
Group: NOC
Post Group: Newbie
Posts: 6
Status:
Thanks for the quick reply, and you are correct, just omitting the locked var when unlocking works to unlock it.

HOWEVER, your documentation located at https://www.virtualizor.com/admin-api/edit-server implicitly states to pass a 1/0 in that var which is where the confusion started. 

Would it be possible to have API documentation updated?

Lastly,
You guys are doing an awesome job keep it up!
IP: --   

[API BUG] Edit Server
chirag
Group: Virtualizor Team
Post Group: Elite Member
Posts: 340
Status:
Hi,

Sir we will update the documentation soon with the changes.

Thank you.

Let us know for further information.
We will be happy to help you.

-----------------------
Virtualizor - VPS Control Panel
Follow us on Facebook
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is September 23, 2019, 9:14 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:1.913