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
Name | Method | Value | Description | Required |
---|---|---|---|---|
act | GET | backup_plans | The action specified to perform operation will return done as true on successful deletion | Yes |
delete | POST | Int | The ID of the plans to be deleted. For deleting multiple plans, pass in the IDs as comma separated values | Yes |
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"
}