Application Programming Interface

Get OS Variant List


Description:

You can get available OS variant list implemented in NODE.ID. You may store the OS variant list information in your application or database to avoid requesting multiple times for same result.

URLs:
  • Sandbox URL: https://virtdedi.com/api-sandbox/v1/get_os_variant_list
  • Real API URL: https://virtdedi.com/api/v1/get_os_variant_list
Request Parameters:

None

JSON Response:
    
        
{
    "code"    : "OK",
    "message" : "",
    "data"    : {
        "l26"    : "Linux 2.6 - 5.X Kernel",
        "l24"    : "Linux 2.4 Kernel",
        "win11"  : "Microsoft Windows 11/2022",
        "win10"  : "Microsoft Windows 10/2016/2019",
        "win8"   : "Microsoft Windows 8/2012/2012r2",
        "win7"   : "Microsoft Windows 7",
        "wvista" : "Microsoft Windows Vista",
        "w2k8"   : "Microsoft Windows 2008",
        "w2k3"   : "Microsoft Windows 2003",
        "w2k"    : "Microsoft Windows 2000",
        "wxp"    : "Microsoft Windows XP",
        "solaris": "Solaris/OpenSolaris/OpenIndiania kernel",
        "other"  : "Unspecified OS"
    }
}
    
XML Response:
    
        
<?xml version="1.0" encoding="utf-8"?>
<code>OK</code>
<message></message>
<data>
    <altlinux1.0>ALT Linux 1.0</altlinux1.0>
    <altlinux2.0>ALT Linux 2.0</altlinux2.0>
    <altlinux2.2>ALT Linux 2.2</altlinux2.2>
    .......................
</data>
    
PHP Example:
    
        
<?php
$url      = "https://virtdedi.com/api-sandbox/v1/get_os_variant_list";
//$url    = "https://virtdedi.com/api/v1/get_os_variant_list";
$user_id  = "12312";
$API_key  = "hasdh6ghvhgFDa454565jasdbNBS";
$random   = rand(10000,99999).uniqid().rand(100000,999999);
$checksum = sha1(sha1(sha1($user_id.$API_key.$random)));
$data = array(
    "user_id"   => $user_id,
    "random"    => $random,
    "format"    => "json",
    "checksum"  => $checksum
);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
$output = curl_exec($ch);
$curl_error = curl_errno($ch);
curl_close($ch);
if ($curl_error){
    echo "Unable to connect to API Server.";
} else {
    $outputArray = json_decode($output,true);
    if (!$outputArray){
        echo "Invalid JSON Format";
    } else {
        if ($outputArray["code"] == "OK"){
            print_r($outputArray);
            // Do what you want to do here if OK
        } else {
            echo "Error Message: ".$outputArray["message"];
            // Do what you want to do here if not OK
        }
    }
}