Getting backup history for a virtual machine

You can get virtual machine backup history. This action is available only in the REST API.

URI and Method

To get information about virtual machine backup history, use a GET method and a URI:

GET     https://{hostname|IP}/ngp/analytics/vmbackuphistory

Parameters

None.

Data

None.

Example: Get virtual machine backup history

A Python snippet that is similar to the following example can be used to request information about virtual machine backup history.

requests.get('https://' + spp_ipv4 + '/ngp/analytics/vmbackuphistory',
    headers={...}, verify=spp_verify)

The request prompts a response that is structured as shown, with the HTTP status of 200 (OK).

{
    "links": {...},
    "instances": [
        {
            "pk": "8989CFF1-6F16-4E2B-9FCC-9F8C8CD719C9",
            "VM": "Sales-Win2016-001",
            "tags": [],
            "SLAPolicy": "Gold",
            "ProtectionTime": 1617235200111,
            "hypervisor": "dallas-hv1.bluemachines.com.invalid",
            "hypervisorType": "Hyper-V",
            "Status": "Success",
            "BackupStorage": "localhost",
            "BackupDetails": {
                "BackupData": 416746424,
                "BackupDuration": 237536
            },
            "TotalRuns": 2
        },
        {...}, ..., {...}
    ]
}

In the previous response, the ProtectionTime value represents the date and time when this backup job was completed. This timestamp uses the UNIX format followed by three digits that represent milliseconds. For example, the value 1617235200111 represents 1 April 2021 at 0:00.111 AM UTC.

The BackupDetails > BackupData value represents the total size of the backup snapshot in bytes. For example, the value 416746424 represents approximately 397 MB.

The BackupDuration value represents the time in milliseconds to complete the backup job. For example, the value 237536 represents 3 minutes and 57.536 seconds.