Get Virtualizor

Status Logs

Use Status Logs API to get the logs of your VPS status on your server.

HTTP Request

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

Parameters

NameTypeValueDescriptionRequired
actGETstatuslogsThe action specified to retrieve dataYes
svsPOSTIntThe vps whose statuslogs have to be retrieved. This is passed to the URLYes
vidPOSTIntThe vpsid of the vps to check the status logs. This is passed as a POST 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 = 3384;

    $output = $admin->statuslogs($vid);

    print_r(json_encode($output));
?>

Curl

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

Output

{
    "uid": "321",
    "act": "statuslogs",
    "timezone": 1,
    "timenow": "September 23, 2016, 7:31 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Status logs",
    "var": [{
        "vpsid": "3008",
        "time": "1474611842",
        "status": "1",
        "disk": "637",
        "inode": "21298",
        "ram": "0",
        "cpu": "1.80",
        "actual_cpu": "1.80",
        "net_in": "0",
        "net_out": "0"
    }, {
        "vpsid": "3008",
        "time": "1474611362",
        "status": "1",
        "disk": "3252",
        "inode": "64813",
        "ram": "0",
        "cpu": "0.70",
        "actual_cpu": "0.70",
        "net_in": "60",
        "net_out": "0"
    }, {
        "vpsid": "3008",
        "time": "1474610884",
        "status": "0",
        "disk": "3252",
        "inode": "64813",
        "ram": "0",
        "cpu": "0.00",
        "actual_cpu": "0.00",
        "net_in": "0",
        "net_out": "0"
    }, {
        "vpsid": "3008",
        "time": "1474610402",
        "status": "1",
        "disk": "3252",
        "inode": "64813",
        "ram": "0",
        "cpu": "1.40",
        "actual_cpu": "1.40",
        "net_in": "60",
        "net_out": "0"
    }],
    "num_res": "1199",
    "time_taken": "0.900"
}
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list