Windows Azure has a rich Management REST API for working with all types of artifacts.
Continuing on with my current theme of working with the Windows Azure Virtual Machines in Preview mode I came across some details of the REST API that might be helpful to others. While the documentation seem to say for GET and DELETE requests you need something like the following:
The only way I have been able to get GET and DELTET requests to work is using “deploymentslots” rather than “deployments”. Below are some samples of REST API URLs that I was able to get working. For POST requests, the below URL was used for sending in a Request Body with additional XML payload details.
The Service Name listed below is the Virtual Machine Name witch is usually the same as the underlying Service (although it does not have to be). When deleting, the Hosted Service used by the Virtual Machine may also need to be deleted.
To Get Virtual Machine Details – HTTP GET
To Delete a Virtual Machine – HTTP DELETE
Make sure to clean up the Service – HTTP DELETE
To Import a VM State (exported using PowerShell): – HTTP POST with Post Body
To use Quick Create or Create a New Virtual Machine: – HTTP POST with Post Body
Hope this helps someone else trying to use the Windows Azure REST API with Virtual Machines.
Windows Azure has a few different, somewhat disjointed, toolsets available to create new artifacts and
While I call this post “tricks” for deleting a Windows Azure Virtual Machine it really is not a trick
Thanks Stephen for the help here.