Get Virtualizor

Server Info

Use the Server Info API to get the information about the server. This information consists of details like the Vitualizor Version which the server is running, API credentials and the number Virtual Private Servers present on the server.

HTTP Request

https://hostname:4085/index.php?act=serverinfo

Parameters

NameMethodValueDescriptionRequired
actGETserverinfoThe action specified to perform operation and retrieve dataYes

Sample Code

<?php

    require_once('/usr/local/virtualizor/sdk/admin.php');

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

    $admin = new Virtualizor_Admin_API($ip, $key, $pass);

    $output = $admin->serverinfo();

    print_r(json_encode($output));
?>

Output

{
    "title": "Server Information",
    "info": {
        "path": "/usr/local/virtualizor",
        "key": "your_api_key",
        "pass": "your_api_pass",
        "kernel": "kvm",
        "num_vs": 1,
        "version": "2.9.7",
        "patch": "0"
    }
}
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list