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
Name | Method | Type | Description | Required |
---|---|---|---|---|
act | GET | text | The action specified to retrieve data after vps is powered off | Yes |
sa | GET | text | The import wizard name of which to use import functionality. | Yes |
ta | GET | text | The action of which we want the data or on which to perform import. | Yes |
changeserid | GET | int | The serid of server on which Feathur is installed, Provide if setup is on slave server, for master server no need to pass this parameter | No |
Supported "ta" Actions
Value | Description | Return Parameters | Required |
---|---|---|---|
nodes | Provide if you want to view Nodes | feathur_nodes | Yes |
users | Provide if you want to view Users | feathur_users | Yes |
ips | Provide if you want to view IP Pools | feathur_ipblocks feathur_ipblocknodes | Yes |
os | Provide if you want to view OS templates | feathur_templates | Yes |
vps | Provide if you want to view VMs | feathur_vps | Yes |
Supported Import Functions
Provide the Parameters in Name column to import specific utility.
Name | Method | Type | Description | "ta" | Required |
---|---|---|---|---|---|
feathur_users | POST | int | Provide if you want to Import Users | users | Yes |
feathur_ips | POST | int | Provide if you want to Import IPs | ips | Yes |
feathur_os | POST | int | Provide if you want to Import OS | os | Yes |
feathur_vps | POST | int | Provide if you want to Import VPS | vps | Yes |
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"
}