API PowerOff VPS

From Virtualizor Wiki
Jump to: navigation, search
NOTE
This is OLD API Documentation. Click on the following link for New API Documentation
Admin API

PowerOff 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->poweroff(1011);
    
    print_r($output);

?>

Returns:

Array
Array
Array
(
    [title] => Virtual Servers
    [vsop] => Array
        (
            [action] => poweroff
            [id] => 1011
            [serid] => 0
            [output] => Domain 1001 destroyed

            [status] => Array
                (
                    [1011] => 0
                )

        )

    [timenow] => 1400147900
    [time_taken] => 0.398
)