CloudboxListVPS

Haal lijst op met informatie van alle bestaande VPSen binnen een Cloudbox omgeving.

Input

Parameter Value Example value
id Cloudbox ID.
Retrieve with CloudboxList
Parameter is verplicht
121


Output

Parameter Value Example value
success command executed successfully 0 = fout
1 = command executed successfully
command_response_message Error
Only sent when value parameter success = 0
incorrect password
total_count Totaal aantal actieve vpsen
Only sent when value parameter success = 1
20
id_X VPS ID (cijfer).
The X runs from 1 to the value of total_count
Only sent when value parameter success = 1
45221
label_X VPS name.
The X runs from 1 to the value of total_count
Only sent when value parameter success = 1
VPS1
cpu_x Amount cpus.
The X runs from 1 to the value of total_count
Only sent when value parameter success = 1
1
memory_x VPS memory.
The X runs from 1 to the value of total_count
Only sent when value parameter success = 1
1024
disk_x VPS disk size.
The X runs from 1 to the value of total_count
Only sent when value parameter success = 1
100
template_X VPS template.
Templates are retrievable with CloudboxListTemplates.
The X runs from 1 to the value of total_count
Only sent when value parameter success = 1
5
ips_x Amount ip addresses.
The X runs from 1 to the value of total_count
Only sent when value parameter success = 1
1
iplist_x Ips separated with '-'.
The X runs from 1 to the value of total_count
Only sent when value parameter success = 1
155.252.1.300-41.20.160.120-


Example

<? require("class_versio_api.php"); unset($command); $command = array( "command" => "CloudboxListVPS", "id" => "123" ); $api = new Versio_api(); $versio = $api->api_send( $command ); IF($versio['success']==0) { echo("Error occured. Error code: ".$versio['command_response_code'].". Error message: ".$versio['command_response_message'].""); } else { IF($versio['total_count']>0) { ?> <table> <? $teller = 1; while($versio['total_count']>=$teller) { ?> <tr> <td><? echo $versio['id_'.$teller]; ?></td> <td><? echo $versio['label_'.$teller]; ?></td> <td><? echo $versio['cpu_'.$teller]; ?> CPUS</td> <td><? echo $versio['memory_'.$teller]; ?> x</td> <td><? echo $versio['disk_'.$teller]; ?></td> <td><? echo $versio['template_'.$teller]; ?> </td> <td><? echo $versio['ips_'.$teller]; ?> IP addresses</td> <? $ips = explode('-', $versio['iplist_'.$teller]); foreach($ips as $ip){ if($ip!=''){ ?> <td>IP: <?=$ip;?></td> <? } } ?> </tr> <? $teller++; } ?> </table> <? } else { echo("No active VPSes found."); } } ?>