Get Virtualizor

Import Feathur

Use the Import Feathur API to get Import supported utilities.

HTTP Request

https://hostname:4085/index.php?act=import&sa=feathur&ta=ACTION&changeserid=SERID

Parameters

NameMethodTypeDescriptionRequired
actGETtextThe action specified to retrieve data after vps is powered offYes
saGETtextThe import wizard name of which to use import functionality.Yes
taGETtextThe action of which we want the data or on which to perform import.Yes
changeseridGETintThe serid of server on which Feathur is installed, Provide if setup is on slave server, for master server no need to pass this parameterNo

Supported "ta" Actions

ValueDescriptionReturn ParametersRequired
nodesProvide if you want to view Nodesfeathur_nodesYes
usersProvide if you want to view Usersfeathur_usersYes
ipsProvide if you want to view IP Poolsfeathur_ipblocks
feathur_ipblocknodes
Yes
osProvide if you want to view OS templatesfeathur_templatesYes
vpsProvide if you want to view VMsfeathur_vpsYes

Supported Import Functions

Provide the Parameters in Name column to import specific utility.

NameMethodTypeDescription"ta" Required
feathur_usersPOSTintProvide if you want to Import UsersusersYes
feathur_ipsPOSTintProvide if you want to Import IPsipsYes
feathur_osPOSTintProvide if you want to Import OSosYes
feathur_vpsPOSTintProvide if you want to Import VPSvpsYes

Sample Code

<?php

    require_once('/usr/local/virtualizor/sdk/admin.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

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

    $post['ta'] = 'vps';
    $post['changeserid'] = 3;
    $post['feathur_vps'] = 1; //Provide if you want to import

    $output = $admin->import_feathur($post);

    print_r(json_encode($output));

?>

Output

{
   "title":"Import",
   "feathur_vps":{
      "1216":{
         "status":"stopped",
         "swap":0,
         "type":"proxl",
         "diskwrite":0,
         "vmid":"1216",
         "netout":0,
         "name":"CT1216",
         "uptime":0,
         "maxdisk":4294967296,
         "disk":0,
         "cpus":4,
         "maxmem":268435456,
         "cpu":0,
         "netin":0,
         "mem":0,
         "lock":"",
         "diskread":0,
         "maxswap":0,
         "template":""
      },
      "1298":{
         "cpu":0,
         "netin":0,
         "disk":0,
         "cpus":2,
         "maxmem":536870912,
         "maxswap":134217728,
         "diskread":0,
         "template":"",
         "mem":0,
         "lock":"",
         "diskwrite":0,
         "type":"proxl",
         "swap":0,
         "status":"stopped",
         "netout":0,
         "name":"test",
         "maxdisk":4294967296,
         "uptime":0,
         "vmid":"1298"
      }
},
   "timenow":1609929387,
   "time_taken":"12.63"
}
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list