Delete Backup Plans

Use the Delete Backup Plans API to delete the backup plan present on the Virtualizor panel, by passing the backup plan ID. The API response will contain “done” as “true” on success.

HTTP Request

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

Parameters

NameMethodValueDescriptionRequired
actGETbackup_plansThe action specified to perform operation will return done as true on successful deletionYes
deletePOSTIntThe ID of the plans to be deleted. For deleting multiple plans, pass in the 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'] = 1;
    $post['delete'] = '1,2'; // for deleting multiple plans

    $output = $admin->deletebackupplan($post);
    print_r(json_encode($output));
?>

Output

{
    "title": "Backup Plans",
    "done": true,
    "backup_plans": null,
    "timenow": 1536954772,
    "time_taken": "0.144"
}
Was this helpful to you?