Skip to main content
Solved

Rest API for VMs

  • February 18, 2022
  • 6 replies
  • 265 views

tgladson
Byte
Forum|alt.badge.img+4

I am trying to determine the correct REST API “get” to list all VM clients (guests) being protected. Maybe I am missing it or it’s more difficult than I think. I can list all VM hosts, VSAs, datastores, etc, but I just need a list of VMs being backed up. 

Any help would be greatly appreciated!

Thanks!

Best answer by tgladson

I figured it out with the help of Commvault Support. You need to put the pagesize in the header of the API request.

View original
Did this answer your question?
If you have a question or comment, please create a topic

6 replies

Forum|alt.badge.img+4
  • Vaulter
  • 18 replies
  • February 18, 2022

Hi @tgladson ,

I looked into this and can agree that it’s at least not easy to find this particular information with REST api (protected vm’s as opposed to just a list of all vm’s). We do have a VM backup report available on the store.

https://documentation.commvault.com/search?q=protected%20vm%20report&oem=commvault&majorVersion=11&minorVersion=24&site=essential

 

I understand that you are looking to pull this from and api call though.  A suggestion is that you use the api to pull report data from this report. A starting point for pulling report information via api calls is in the link below

https://documentation.commvault.com/11.24/essential/115048_rest_apis_for_reports.html

 

Regards

Joe

 


tgladson
Byte
Forum|alt.badge.img+4
  • Author
  • Byte
  • 8 replies
  • February 18, 2022

Thanks, @JBuratti !

I hadn’t looked at getting the data using the report api. I took a quick look and...well….the data is there. Now to figure out how to get it in the format I want. 

 


tgladson
Byte
Forum|alt.badge.img+4
  • Author
  • Byte
  • 8 replies
  • March 1, 2022

@JBuratti  Using the API I have tried https://<<commserv>>/webconsole/api/VM?status=1 but it is only pulling about 70 VMs and it should be listing thousands. Am I missing something to pull all VMs?


Mike Struening
Vaulter
Forum|alt.badge.img+23

@tgladson , have you looked at GET VM Details?

https://api.commvault.com/#c39d4219-26e0-4090-b6a0-103f8319330b

That should give you the backup status and a lot more.


tgladson
Byte
Forum|alt.badge.img+4
  • Author
  • Byte
  • 8 replies
  • Answer
  • March 3, 2022

I figured it out with the help of Commvault Support. You need to put the pagesize in the header of the API request.


Mike Struening
Vaulter
Forum|alt.badge.img+23

Glad to hear it!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings