Delete Backup Server

Use the Delete Backup Server API to delete the information about the backup server. The API response will return “done” as the details of the deleted backup server on success.

HTTP Request

https://hostname:4085/index.php?act=backupservers&delete=ID

Parameters

NameMethodValueDescriptionRequired
actGETbackupserversThe action will return “done” as the details of the deleted backup server on successYes
deleteGETIntThe backup server ID that needs to be deleted, you can delete multiple backup servers by passing the backup server IDs as comma separated valuesYes

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);

    $post = array();
    $post['delete'] = 37;
    $post['delete'] = '37,36'; // For deleting multiple backup servers

    $output = $admin->deletebackupservers($post);

    print_r(json_encode($output));
?>

Output

{
    "title": "Backup Servers",
    "done": {
        "6": {
            "bid": "6",
            "type": "SSH",
            "name": "backupstest1",
            "hostname": "testhost",
            "port": "22",
            "dir": ""
        }
    },
    "backupservers": null,
    "timenow": 1535554537,
    "time_taken": "0.221"
}
Was this helpful to you?