System Alerts

HTTP Request

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

Parameters

NameTypeValueDescriptionRequired
actGETsystem_alertsThe action will return the system alertsYes
svsPOSTvpsidThe vpsid whose system alerts have to be listed. Will be sent via URL.Yes
vidPOSTvpsidThe vpsid whose system alerts have to be listed. Will be sent as a POST Parameter.Yes

Sample Code

PHP

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

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $vid = 3615;
    $output = $admin->system_alerts($vid);

    print_r(json_encode($output));  
?>

Curl

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

Output

{
    "uid": "372",
    "act": "system_alerts",
    "timezone": 1,
    "timenow": "October 11, 2016, 5:41 am",
    "vpsid": 3615,
    "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": "System Alerts",
    "alerts": [{
        "vpsid": "3615",
        "time": "1476160806",
        "cpu": "2.37",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476160326",
        "cpu": "0.10",
        "ram": "1.27",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476159846",
        "cpu": "0.10",
        "ram": "1.27",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476159366",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476158887",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476158406",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476158166",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476157686",
        "cpu": "2.32",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476157206",
        "cpu": "2.37",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476156726",
        "cpu": "2.37",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476156246",
        "cpu": "2.37",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476155766",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476155286",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476154806",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476154566",
        "cpu": "2.37",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476154086",
        "cpu": "2.37",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476153607",
        "cpu": "0.10",
        "ram": "1.17",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476153126",
        "cpu": "0.10",
        "ram": "1.27",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476152646",
        "cpu": "2.37",
        "ram": "1.27",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476152167",
        "cpu": "0.10",
        "ram": "0.98",
        "disk": "12.57"
    }, {
        "vpsid": "3615",
        "time": "1476151685",
        "cpu": "0.10",
        "ram": "0.78",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476151205",
        "cpu": "0.10",
        "ram": "0.78",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476150965",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476150486",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476150005",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476149526",
        "cpu": "2.37",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476149045",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476148565",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476148086",
        "cpu": "2.32",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476147605",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476147365",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476146885",
        "cpu": "2.32",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476146406",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476145925",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476145445",
        "cpu": "2.37",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476144966",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476144485",
        "cpu": "2.37",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476144005",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476143765",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476143285",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476142805",
        "cpu": "2.37",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476142325",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476141845",
        "cpu": "2.32",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476141366",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476140885",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476140406",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476140166",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476139685",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476139206",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }, {
        "vpsid": "3615",
        "time": "1476138725",
        "cpu": "0.10",
        "ram": "0.68",
        "disk": "9.20"
    }],
    "num_res": "380",
    "time_taken": "0.112"
}
Was this helpful to you?