Get Virtualizor

Poweroff VM

Use Poweroff VPS to power off your VPS on your server.

HTTP Request

https://hostname:4083/index.php?act=poweroff&do=1&svs=vpsid

Parameters

NameTypeValueDescriptionRequired
actGETpoweroffThe action to be carried out on the vpsYes
doGET1If set this will allow the operation to be carried outYes
svsPOSTIntThe vps id to be powered off is passed as a parameterYes

Sample Code

PHP

<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $vid = 3332;

    $output = $admin->poweroff($vid);
    print_r(json_encode($output));
?>

Curl

curl -k  -L "https://hostname:4083/index.php?
svs=3560&act=poweroff&api=json
&apikey=your_api_key&apipass=your_api_pass&do=1"

Output

{
    "uid": "321",
    "act": "poweroff",
    "timezone": 1,
    "timenow": "September 20, 2016, 6:58 am",
    "vpsid": 3560,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Powereoff VPS",
    "error": ["The operation could not be completed"],
    "status": 0,
    "output": null,
    "time_taken": "0.411"
}
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list