vCenter

 View Only
Expand all | Collapse all

REST API: Snapshot management

drmartinez12060

drmartinez12060Jun 07, 2017 11:02 PM

  • 1.  REST API: Snapshot management

    Posted Jun 06, 2017 11:58 AM

    Hello, I am new to the forums. I been working with the REST API stuff for vCenter. I have read both online and pdf resource on the API and cannot find anything related to either creating/deleting a snapshot or the ability to revert a VM to a snapshot. It's possible I may have missed this and was wondering if anyone had a definitive answer whether or not this is implemented in the REST sdk at the moment. Also I should say I'm using the VMware's 6.5 releases.

    Also if this is not implemented, is there any alternative?



  • 2.  RE: REST API: Snapshot management

    Posted Jun 07, 2017 11:02 PM

    Really? No answer to this.



  • 3.  RE: REST API: Snapshot management

    Broadcom Employee
    Posted Jun 28, 2017 10:18 AM

    Hello, Not sure on how much this may help but have you had a chance to look at Understanding VM snapshots in ESXi / ESX (1015180) | VMware KB



  • 4.  RE: REST API: Snapshot management

    Posted Apr 14, 2019 08:28 PM

    No helpful answer after 21 Month ... I'm so disappointed.



  • 5.  RE: REST API: Snapshot management

    Posted Apr 14, 2019 08:53 PM

    Sorry you're so disappointed. There is no REST API coverage of snapshot operations in 6.5 or 6.7 at this time



  • 6.  RE: REST API: Snapshot management

    Posted Jun 12, 2020 12:27 PM

    Is it in 7.0?



  • 7.  RE: REST API: Snapshot management

    Posted Jun 12, 2020 12:46 PM

    Still no, unfortunately.



  • 8.  RE: REST API: Snapshot management

    Posted Feb 04, 2021 11:52 AM

    Unbelievably ridiculous that the REST API doesn't have this yet.

    A long time ago I wrote a program that automated testing for the product I work with. It would revert the snapshots on like a dozen Workstation VMs, and install our latest software on the VMs. But I haven't been able to use that program since VMware Workstation 12!

    Any plans to bring back VMWareTasks for the latest versions of VMware Workstation? That was a very thorough and useful API. The REST API is almost useless.

    Thanks in advance.



  • 9.  RE: REST API: Snapshot management

    Posted Oct 08, 2021 04:15 PM

    and still no Snapshot Management over REST API. I hope this gets implemented soon.



  • 10.  RE: REST API: Snapshot management

    Posted Jul 18, 2022 09:29 PM

    Hey VMWare, how are you not incredibly embarrassed with yourselves that you can't be bothered to implement such a useful feature in over 5 years?!  This is an absolute joke.



  • 11.  RE: REST API: Snapshot management

    Posted Jul 27, 2022 04:27 PM

    I agree, but I'm curious why this topic does not get upvoted by other users. Its like every year only one person has interest, googles the issue and finds this topic.

     

    My only guess is, that Kubernetes and other container software has won the race and we are just the 'old' users still using VMware.

     

    Currently we as company looking for an alternative solution that is somewhat turn key ready. Our opinion is that Kubernetes is far away from being easy to use.

     

    K3s seems to fit more in our case, but its still being evaluated.



  • 12.  RE: REST API: Snapshot management

    Posted Oct 05, 2022 10:29 AM

    What are the known alternatives to automating a VM snapshot?

    Obviously backup solution providers do so, how?



  • 13.  RE: REST API: Snapshot management

    Posted Oct 05, 2022 05:15 PM

    We use PowerShell within a Docker container in Linux.

    To integrate this with our existing automation solution that PowerShell script creates a little web server, protected by a password. This little webserver receives a HTTP-POST call and returns the success status to our automation solution.

    So basically PowerShell calls this: https://vdc-repo.vmware.com/vmwb-repository/dcr-public/85a74cac-7b7b-45b0-b850-00ca08d1f238/ae65ebd9-158b-4f31-aa9c-4bbdc724cc38/doc/New-Snapshot.html

    We know that this is far from a good solution, but it works well and is secure enough since that Docker container can only communicate with our automation solution.



  • 14.  RE: REST API: Snapshot management

    Posted Jul 19, 2023 09:57 AM

    We've got VS 8.x now... What's with this Topic? Any News?

    AFAIK the API is still let's kindly say "rudimental" ... it's a shame.



  • 15.  RE: REST API: Snapshot management

    Posted Jul 19, 2023 10:52 AM

    Yes that's a shame. Seems like VMware is unaware or incompetent.

    https://developer.vmware.com/apis/vsphere-automation/latest/vcenter/search.html?query=snapshot

    Proves that community platforms like this one are ignored by company's and just used as a rant vent / echo box.

     



  • 16.  RE: REST API: Snapshot management

    Posted Aug 21, 2024 06:41 PM

    you ever wonder how LCM is doing automated snapshots if this api didn't exist? I think they just avoided publishing it.




  • 17.  RE: REST API: Snapshot management

    Posted Oct 12, 2023 11:08 AM


  • 18.  RE: REST API: Snapshot management

    Posted Oct 12, 2023 12:20 PM

    Thank you for your info!

    Your link was not quite right, but I looked around and found this:

    https://developer.vmware.com/apis/vi-json/8.0.1.0/sdk/vim25/release/VirtualMachine/moId/CreateSnapshotEx_Task/post/

    It seems that finally there is a way to create snaphots for VMs using the HTTP-API! It took only more than 6 years to implement this! I'm really happy that I do not have PowerShell/Python scripts running under Linux/Docker where I can trigger/list snapshots.

     

    But what is "Virtual Infrastructure JSON API"? Is it just the name of the new API or is it an additional product/software that requires a license?



  • 19.  RE: REST API: Snapshot management

    Posted Aug 21, 2024 06:38 PM

    here is an example of how to use it with curl. Pretty easy

    vmware-scripts/shell/create_snapshot_for_vm.sh at master · lamw/vmware-scripts (github.com)