API Start VPS

From Virtualizor Wiki
Jump to: navigation, search

Start a VPS (Master and Slave)


Parameters Description
vpsid VPSID is VID of the VPS.

Example Code:

<?php

    require_once('admin.php');

    $key =  'uketenhrhpunty5lhgwkcuxxxxxxxxxx';

    $pass = 'yrsofc3tg3tre7bjpfppspxxxxxxxxxx';

    $ip = 'xxx.xxx.xxx.xxx';

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

    $output = $admin->start(1002);
    
    print_r($output);

?>

Returns:

Array
(
    [title] => Virtual Servers
    [vsop] => Array
        (
            [action] => start
            [id] => 1991
            [serid] => 0
            [output] => Domain 1991 created from /etc/libvirt/qemu/1001.xml

            [status] => Array
                (
                    [1991] => 1
                )

        )

    [timenow] => 1400146634
    [time_taken] => 2.908
)