Welcome Guest. Please Login or Register  


You are here: Index > Virtualizor - Virtual Server Control Panel > General Support > Topic : API is not working



Normal Mode | Print  

 API is not working, I cannot list VPS servers via API (3 Replies, Read 7044 times)
TopKenzo
Group: Member
Post Group: Newbie
Posts: 17
Status:
Hello, i'm trying to integrate Virtualizor with a commercial billing software and every time i use the API, the output is "false".

Why? All data from  the API is 100% correct and when i try to use the API via direct link opening it is working.


PHP Code

 $key =  'xxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$pass 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$ip 'censored IP';

require(
$_SERVER['DOCUMENT_ROOT'].'/content/addons/Virtualizor/API/admin.php');

                
$admin = new Virtualizor_Admin_API($ip$key$pass);

                
$page 0;
                
$reslen 0;
                
//For Searching
                
$post = array();
                
$post['vpsid'] = '';
                
$post['vpsname'] = '';
                
$post['vpsip'] = '';
                
$post['vpshostname'] = '';
                
$post['vsstatus'] = '';
                
$post['vstype'] = '';
                
$post['speedcap'] = '';
                
$post['user'] = '';
                
$post['vsgid'] = '';
                
$post['vserid'] = '';
                
$post['plid'] = '';
                
$post['bpid'] = '';
                
$post['serid'] = '';
                
$post['search'] = '';

                
$output $admin->listvs($page ,$reslen ,$post);

                
print_r(json_encode($output)); // RETURNS "false" 

IP: --   


Threads
 TopKenzo   API is not working, I cannot list VPS servers via API (3 Replies, Read 7044 times)
    |--  virtualizor-manager   Hi, try this...   on July 23, 2020, 12:41 pm
    |--  TopKenzo   Already tried this,...   on July 23, 2020, 4:15 pm
    |--  urgido   same issue here   on September 25, 2021, 7:54 am

« Previous    Next »

Normal Mode | Print  



Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is May 2, 2024, 8:35 pm.

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