RESTful knowledge exchange
Post Reply
donaldli
Service Provider
Posts: 23
Liked: 5 times
Joined: Mar 17, 2021 3:22 am
Full Name: Donald Li
Contact:

How to get number of VMs under Protected of Tenant view

Post by donaldli »

In Tenant view of EM Self-Service Portal, under "Protected" section, there is a number of "VMs".
How can Provider get this number using API? It does not matter whether it's Powershell or REST API.
If you want to refer to a support case, here it is "Case #07209257 — How to get number of VMs under Protected of Tenant view".
Thanks!
oleg.feoktistov
Veeam Software
Posts: 1922
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: How to get number of VMs under Protected of Tenant view

Post by oleg.feoktistov »

Hi Donald,

This counter is not available through EM REST API by default, but you can calculate it based on self-service tenant backups that are available in your admin view in Enterprise Manager:

1. Query the list of backups with GET /backups and look for tenant backups with tenant in backup names.
2. Obtain the list of restore points with GET /backups/{ID}/restorePoints.
3. Follow the links to /vmRestorePoints from restore points response model.
4. Obtain vm names and hierarchy object refs with GET /restorePoints/{id}/vmRestorePoints?format=Entity for each of the restore points.
5. Deduplicate VM count obtained.
6. The VM count obtained should be equal to the number shown in "Protected" view of Self-Service portal on tenant's side if you calculated it based on all tenant backups and deduplicated VMs in restore points correctly.

Best regards,
Oleg
donaldli
Service Provider
Posts: 23
Liked: 5 times
Joined: Mar 17, 2021 3:22 am
Full Name: Donald Li
Contact:

Re: How to get number of VMs under Protected of Tenant view

Post by donaldli »

Hi Oleg,
Thanks for your reply!

I can get results from /backups/{ID}/restorePoints. But there is no /vmRestorePoints. I searched `vm` in the response and found 0 match.
Attached is one piece of the whole response:

Code: Select all

{
    "Refs": [
        {
            "Links": [
                {
                    "Rel": "Up",
                    "Href": "https://EMServer:9398/api/backupServers/3d15444a-afeb-423d-a9d7-27722086b19c",
                    "Name": "VBRServer",
                    "Type": "BackupServerReference"
                },
                {
                    "Rel": "Up",
                    "Href": "https://EMServer:9398/api/backups/96e4b699-0b80-4c51-8490-000b15f6ad32",
                    "Name": "OrgUUID_vdcg010-b3-09 - s01vl9988481-0if8",
                    "Type": "BackupReference"
                },
                {
                    "Rel": "Alternate",
                    "Href": "https://EMServer:9398/api/restorePoints/201b0189-2cde-4afc-a1cc-129f7d102bbc?format=Entity",
                    "Name": "Apr 11 2024  6:06PM",
                    "Type": "RestorePoint"
                },
                {
                    "Rel": "Down",
                    "Href": "https://EMServer:9398/api/restorePoints/201b0189-2cde-4afc-a1cc-129f7d102bbc/vAppRestorePoints",
                    "Name": null,
                    "Type": "VAppRestorePointReferenceList"
                },
                {
                    "Rel": "Related",
                    "Href": "https://EMServer:9398/api/restorePoints/201b0189-2cde-4afc-a1cc-129f7d102bbc/backupFiles",
                    "Name": null,
                    "Type": "BackupFileReferenceList"
                }
            ],
            "UID": "urn:veeam:RestorePoint:201b0189-2cde-4afc-a1cc-129f7d102bbc",
            "Name": "Apr 11 2024  6:06PM",
            "Href": "https://EMServer:9398/api/restorePoints/201b0189-2cde-4afc-a1cc-129f7d102bbc",
            "Type": "RestorePointReference"
        },
Then I tried the /vAppRestorePoints, the response is empty.

Code: Select all

{"Refs":[]}
oleg.feoktistov
Veeam Software
Posts: 1922
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: How to get number of VMs under Protected of Tenant view

Post by oleg.feoktistov »

Hi Donald,

Looks unexpected, vApp restore point should point to a correct representation of a backed up vApp. I'd suggest to contact our support and share case id here.

Best regards,
Oleg
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest