Get Virtualizor

List Distro

Use the List Distro API to list the distribution information present on the server. This is the information about the distribution flavor of the OS that will be used for the creation of Virtual Private Servers. By default Virtualizor provides information about eight types of distributions viz. CentOS, Fedora, openSUSE, Debian, Ubuntu, Scientific, Windows and Webuzo. In addition to that you can add information about any new distros. The API response will consist of the list of the distros, which are listed according to the distribution names.

HTTP Request

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

Parameters

NameMethodValueDescriptionRequired
actGETlist_distrosThe 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->list_distros();

    print_r(json_encode($output));
?>

Output

{
    "title": "List Distros",
    "oses": "null",
    "oslist": "null",
    "ostemplates": "null",
    "mgs": "null",
    "distros": {
        "centos": {
            "distro": "centos",
            "name": "CentOS",
            "logo": "",
            "screenshot": "",
            "desc": "CentOS is an Enterprise-class Linux Distribution derived from sources freely provided to the public by a prominent North American Enterprise Linux vendor.\n<br \/>\n<br \/>\nCentOS conforms fully with the upstream vendors redistribution policy and aims to be 100% binary compatible. CentOS mainly changes packages to remove upstream vendor branding and artwork.  \n<br \/>\n<br \/>\nCentOS is developed by a small but growing team of core developers. CentOS is free.",
            "permanent": 1
        },
        "fedora": {
            "distro": "fedora",
            "name": "Fedora",
            "logo": "",
            "screenshot": "",
            "desc": "Fedora is a Linux-based operating system that showcases the latest in free and open source software. Fedora is always free for anyone to use, modify, and distribute. \n<br \/>\n<br \/>\nIt is built by people across the globe who work together as a community: the Fedora Project. The Fedora Project is open and anyone is welcome to join.\n<br \/>\n<br \/>\nThe Fedora Project is out front for you, leading the advancement of free, open software and content.",
            "permanent": 1
        },
        "suse": {
            "distro": "suse",
            "name": "openSUSE",
            "logo": "",
            "screenshot": "",
            "desc": "openSUSE is a free and Linux-based operating system for your PC, Laptop or Server. \nThe openSUSE project is a worldwide effort that promotes the use of Linux everywhere. \n<br \/>\n<br \/>\nopenSUSE creates one of the world's best Linux distributions, working together in an open, transparent and friendly manner as part of the worldwide Free and Open Source Software community.\n<br \/>\n<br \/>\nThe project is controlled by its community and relies on the contributions of individuals, working as testers, writers, translators, usability experts, artists and ambassadors or developers.",
            "permanent": 1
        },
        "debian": {
            "distro": "debian",
            "name": "Debian",
            "desc": "Debian is a free operating system (OS) for your computer. An operating system is the set of basic programs and utilities that make your computer run. \r\n<br \/>\r\n<br \/>\r\nDebian uses the Linux kernel (the core of an operating system), but most of the basic OS tools come from the GNU project; hence the name GNU\/Linux.\r\n<br \/>\r\n<br \/>\r\nDebian GNU\/Linux provides more than a pure OS: it comes with over 25000 packages, precompiled software bundled up in a nice format for easy installation on your machine.",
            "logo": "",
            "screenshot": "",
            "permanent": 1
        },
        "ubuntu": {
            "distro": "ubuntu",
            "name": "Ubuntu",
            "logo": "",
            "screenshot": "",
            "desc": "Ubuntu is part of the Debian family of Linux operating systems, which has the largest pool of developer talent, with every package built by experts. \n<br \/>\n<br \/>Canonical's rigorous release management, quality assurance, stress testing and product design enhances the quality of Ubuntu Server.\n<br \/>\n<br \/>\nSuper-fast and great-looking, Ubuntu is a secure, intuitive operating system that powers desktops, servers, netbooks and laptops. Ubuntu is, and always will be, absolutely free.",
            "permanent": 1
        },
        "scientific": {
            "distro": "scientific",
            "name": "Scientific",
            "logo": "",
            "screenshot": "",
            "desc": "Scientific Linux is an Enterprise Linux rebuild sponsored by Fermi National Accelerator Laboratory. \n<br \/>\n<br \/>Scientific Linux has been installed all over the world. At one time or another Scientific Linux has had an install base in experiments on all seven continents. It has even been loaded onto systems at the International Space Station."
        },
        "newditrosss": {
            "distro": "newditrosss",
            "name": "newditrosss",
            "desc": "",
            "logo": "http:\/\/serversub.net\/img\/Windows_logo_-_2012_derivative.svg.png",
            "screenshot": ""
        },
        "test": {
            "distro": "test",
            "name": "Test Distro",
            "desc": "shi <b> abdccsd <\/b>asasasjlj\r\naskdaskd;lasd\r\nadasjdkaljsd",
            "logo": "http:\/\/www.littleendian.com\/wp-content\/uploads\/windows_logo_2012_small.png",
            "screenshot": "http:\/\/i444.photobucket.com\/albums\/qq169\/temari253\/Naruto-1.jpg"
        },
        "test_distro": {
            "distro": "test_distro",
            "name": "test",
            "desc": "This is a test distro",
            "logo": "",
            "screenshot": ""
        },
        "windows": {
            "distro": "windows",
            "name": "Windows",
            "desc": "Test",
            "logo": "http:\/\/serversub.net\/img\/Windows_logo_-_2012_derivative.svg.png",
            "screenshot": ""
        }
    },
    "timenow": "1473749151",
    "time_taken": "0.077"
}
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list