Delete Self Shutdown

Use Delete Self Shutdown API to delete scheduled ( start | stop | restart | power off ) actions on VPS on your server.

HTTP Request

https://hostname:4083/index.php?act=self_shutdown&svs=vpsid

Parameters

NameTypeValueDescriptionRequired
actGETself_shutdownThe action will shutdown the vps itself dependind on the timing setYes
svsPOSTvpsidThe vps which needs to be shutdownYes
selfshutdownPOST1/0If set then the vps will be shutdownYes
delete_timerPOSTIntThe timer which will need to be deletedYes

Sample Code

PHP

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

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

    $vid = 3609;
    $post = array();
    $post['selfshutdown'] = 1;
    $post['delete_timer'] = 10;

    $output = $admin->self_shutdown($vid, $post);

    print_r(json_encode($output));
?>

Curl

curl -k -X POST -d "delete_timer=9&selfshutdown=1" -L
"https://hostname:4083/index.php?act=self_shutdown& 
svs=3609&api=json&apikey=your_api_key& 
apipass=your_api_pass"

Output

{
    "uid": "372",
    "act": "self_shutdown",
    "timezone": 1,
    "timenow": "October 9, 2016, 2:20 am",
    "vpsid": 3609,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Self Shutdown",
    "self_shutdown": {
        "page": {
            "start": 0,
            "len": 50,
            "maxNum": "1"
        },
        "self_shutdown": {
            "11": {
                "id": "11",
                "vpsid": "3609",
                "time": "10/10/2016 12:30",
                "action": "2",
                "status": null,
                "date": "10/10/2016",
                "hours": "12",
                "minutes": "30"
            }
        }
    },
    "done": {
        "msg": "Action deleted",
        "done": true
    },
    "time_taken": "0.084"
}
Was this helpful to you?