Use the List Databackup API to list the filenames of the backed up database. The API response contains the list of the backed up files, which are listed according to their IDs.
HTTP Request
https://hostname:4085/index.php?act=databackup
Parameters
Name | Method | Value | Description | Required |
---|---|---|---|---|
act | GET | databackup | The action will return the filenames of the backedup database | 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);
$output = $admin->listdbbackfiles();
print_r(json_encode($output));
?>
Output
{
"title": "Database Backup",
"filename": {
"2": "virtualizor-2018-09-18_16.33.13.sql.gz",
"3": "virtualizor-2018-09-18_16.33.18.sql.gz"
}
}