API Delete VPS

From Virtualizor Wiki
Jump to: navigation, search
NOTE
This is OLD API Documentation. Click on the following link for New API Documentation
Admin API

Delete VPS


Parameters Description
vpsid VPS Id of the VPS to be deleted

Example Code:

<?php
    require_once('admin.php');

    $key =  'uketenhrhpunty5lhgwkcuxxxxxxxxxx';

    $pass = 'yrsofc3tg3tre7bjpfppspxxxxxxxxxx';

    $ip = 'xxx.xxx.xxx.xxx';

    $admin = new Virtualizor_Admin_API($ip, $key, $pass);
    
    $output = $admin->delete_vs(1011);
    if($output == 1){
        echo 'VPS deleted Sucessfully.';
    }
?>

Returns:

VPS deleted Sucessfully.