Get Virtualizor

Cloud Resources

Use Cloud Resources API to get information about the resources form the server.

HTTP Request

https://hostname:4083/index.php?act=cloudres

Parameters

NameTypeValueDescriptionRequired
actPOSTcloudresThe resources assigned and left for the cloud userYes

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);

    $output = $admin->cloudres();
?>

Curl

curl -k -X GET -L "http://hostname:4083/index.php?act=cloudres&api=json&
apikey=your_api_key=your_api_pass"

Output

{
    "uid": "372",
    "act": "cloudres",
    "timezone": 1,
    "timenow": "October 2, 2016, 6:43 am",
    "vpsid": "3589",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Cloud Resources",
    "resources": {
        "num_vs": 99998,
        "num_users": 15,
        "space": 42,
        "ram": 0,
        "burst": 1024,
        "bandwidth": 1000000,
        "num_ipv4": 48,
        "num_ipv6_subnet": 0,
        "num_ipv6": "0",
        "cores": "8",
        "num_cores": 9992,
        "allowed_virts": {
            "kvm": "kvm"
        }
    },
    "usage": {
        "num_cores": 8
    },
    "users": {
        "372": {
            "uid": "372",
            "email": "test@test.com"
        }
    },
    "res_limit": {
        "num_vs": "100000",
        "num_users": "15",
        "space": "50",
        "ram": "2048",
        "bandwidth": "1000000",
        "num_ipv4": "50",
        "num_ipv6_subnet": "0",
        "num_ipv6": "0",
        "num_cores": "10000",
        "cores": "8"
    },
    "time_taken": "0.127"
}
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list