Delete Backup

Use Delete Backup API to delete existing backup of your VPS on your server.

HTTP Request

https://hostname:4083/index.php?act=backups&svs=vpsid

Parameters

NameTypeValueDescriptionRequired
actGETbackupsThe action which will delete backupsYes
svsPOSTvpsidThe vps which needs to be deleted. This is passed in URLYes
del_backupsPOST1/0If set then the vps backup will be deletedYes
vidPOSTvpsidThe vps which needs to be deleted.This is passed as a POST ParameterYes

Sample Code

PHP

<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_Apia_pass';
    $ip = 'your_Server_ip';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);
    $vid = 3615;
    $post['del_backup'] = 1;
    $output = $admin->delete_backup($post, $vid);

    print_r(json_encode($output));
?>

Curl

curl -k -X POST -d "del_backup=1" -L "https://hostname:4083/index.php?act=backup&svs=3615&api=json&apikey=your_api_key&apipass=your_api_pass"

Output

{
    "uid": "372",
    "act": "backup",
    "timezone": 1,
    "timenow": "October 9, 2016, 7:32 am",
    "vpsid": 3615,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "Backup",
    "done": {
        "msg": "The VPS backup deletion process has been started. Please allow a few minutes for it to complete. You will recieve a notification email when its is completed."
    },
    "vps_name": "105",
    "backups_list": 0,
    "time_taken": "0.533"
}
Was this helpful to you?