https://documentation.commvault.com/v11/essential/125353_rest_api_get_virtual_machines.html
GET <webservice>/VM operation give us the list of virtual machines
it gives almost all the info about the VM, like latest backupjobid, vmsize, the virtualization client info, subclientid, clientid etc.
Instead of listing all VMs’ i want this info for a specific VM, how shall i fiilter out the info for a VM in this API operation.
2 methods that i tried are, but this isn’t giving me complete info
GET <webservice>/VM?Search=vmStatusInfoList.client.clientName%3Acontains%3Axpath:{/workflow/inputs/source_vm}&
GET <webservice>/VM?Search=vmStatusInfoList.vsaSubClientEntity.subclientName%3Acontains%3Axpath:{/workflow/inputs/source_vm}&
but I’m not getting the complete info of that VM, i would like to retrieve the whole record info for a specific VM.
Example:
Sample response of Get VM
=========================
"totalRecords":5,"pageNo":0,"errorMessage":"","errorCode":0,"pageSize":100,"vmStatusInfoList":[
{
"vmHost":"",
"bkpStartTime":1665719167,
"type":9,"vmStatus":1,
"slaStatus":1,
"vmUsedSpace":6442642704,
"isFSAgentBackedUp":true,
"subclientId":1234,
"bkpEndTime":1665719336,
"vmFailureReasonForWarning":"",
"name":"vmtest1",
"storagepolicyName":"VM_IntelliSnap_StoragePolicy",
"slaCategory":1,
"vmGuestSpace":6442642704,
"latestBackupTimeCatalogedSuccessfully":0,
"isIndexingV2":true,
"vmBackupJob":1234567,
"strOSName":"windows-server-2012-r2-dc",
"isDeleted":false,"vendor":16,
"osType":1,
"applicationSize":6442642704,
"vmSize":6442642704,
"slaCategoryDescription":"Protected",
"vmAgent":"cvltproxy",
"retireClientPhase":0,
"isContentIndexded":false,
"isBackupAllowed":true,
"vmHardwareVer":"",
"strGUID":"1234567891234567891",
"subclientName":"vmtest1_2_daily",
"vsaNextBackupSubClientEntity":{"backupsetId":4321,"subclientId":1234,"subclientName":"vmtest1_2_daily","flags":{}
},"instanceEntity":{
"instanceId":1677
},"commCell":{
"_type_":1,"commCellName":"cvltserver","csGUID":"test-1234-TEST-1234"
},"proxyClient":{
"clientId":9123,"clientName":"cvltproxy"
},"plan":{
},"vsaSubClientEntity":{
"backupsetId":4321,"subclientId":1234,"subclientName":"vmtest1_2_daily"
},"client":{
"clientId":2345,"clientName":"vmtest1","displayName":"vmtest1","flags":{
"include":true
}
},"pseudoClient":{
"clientId":5678,"clientName":"IntelliSnap_VM","flags":{
"disabled":false
}
},"lastBackupJobInfo":{
"jobID":1234567,"commCellID":9,"failureReasonMessageEnglish":"","status":1,"startTime":{
"time":1665719167
},"endTime":{
"time":1665719445
}
},
....similar other records for remaining VM’s
]
Best answer by christopherlecky
View original