I am trying to automate reverting to a specific snapshot in vSphere using the SOAP API.
I was able to use the /api
endpoint to start a session and get a VM’s moID. I then try to get the snapshot to access the rootSnapshotList
using the following request
https://{domain}/sdk/vim25/8.0.3.0/VirtualMachine/{moID}/snapshot
I use the same session ID that I used in the /api
routes.
This request returns a 404.
I can navigate to the moID browser to view the VM (/mob/?moid={moID}
), so the moID is correct. The domain is the same domain used in setting up the session.
I can reach /sdk/vimService.wsdl
.
I get a 404 on the first step (getting ServiceInstance moID) when following the Getting Started with the Virtual Infrastructure JSON API Guide
The REST API seems to work, but I need to use the SOAP API to handle snapshots.
I’m not quite sure what the problem is, any help would be appreciated.