Integrating Integrators – BizTalk, Windows Azure, Windows Workflow, and Beyond

Microsoft Azure IaaS

This group is the top level group for Microsoft Azure including Cloud Services, Virtual Machines, Storage, Service Bus, and more.

Windows Azure REST API Simple Sample and Tool

Windows Azure REST API Simple Sample and Tool

This tool is intended to get you moving in the right direction and not intended to solve all your problems out of the box. You will need to use the Windows Azure REST API Reference guide when working with this tool.

I have provided a few sample Request Body templates for Creating a Hosted Service, Creating an Azure Storage Account, Adding a Virtual Machine Disk, and Creating a Virtual Machine (note to create a VM is a multi-step process, see below). Others can easily be added by using the online reference guide.

To use this sample tool you need to configure some basic information inside the App.Config file. You need to set the path to your management certificate, your subscription id, and the path to the folder location of your POST bodies.

    <!--  Enter the full path to the Windows Azure Management Certificate. More details at -->
    <add key='CertificatePath' value='C:\DemoFolder\yourcert.cer'/>

    <!-- Subscription ID for the account and must match Management Certificate -->
    <add key='Subscription' value='your account id' />

    <!--  Default folder location of REST API Post Bodies.  This exists to save time selecting the Post Body file. -->
    <add key='PostBodiesFolder' value='C:\DemoFolder\WindowsAzureRESTApiHelper\WindowsAzureRESTApiHelper\RESTAPIBodies\'/>

How to Use this Sample Tool

1. Once the App.config is setup simply launch the tool. It was built with Visual Studios 2010 but should upgrade to 2012 without issues.

2. Select one of the GET, POST, or DELETE radio buttons.

3. Select your basic action from the drop down or paste in your URL into the text box.

4. Click on “Make A REST Service Call” to complete your request.

5. If you are doing a POST, you will be prompted to select the body of your request.

6. If you do a POST or a DELTE that is an asynchronous process a Request ID is returned in the Response Header. The tool will detect this and auto populate a URL to check the result of the request.

7. You can keep clicking the “Make REST Service Call” button to check the results of the submitted operation until it is competed.

It is that simple!!! Like I said before, this tool is intended to be a starting point for someone new to working with the Windows Azure REST API’s.

Other useful pieces of information

1. To create a new Virtual Machine you need to do the following: First, create the Service using Create Hosted Service. Second, you can use the Quick Create using that Service to create the Virtual Machine.

2. If you plan to work with Virtual Machines using the API, read this blog post about the URLs.

3. If you run into issues the best way to confirm the URL and Post Body is to perform the actions using PowerShell with Fiddler running. This will show the URL and exact Post Body.

  • Downloads: 701
  • Size: 38.1kB
  • Views: 8,536
  • Comments 3
Rate This
Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Post
  • re: Windows Azure REST API Simple Sample and Tool

    Hi Stephan,

    any Idea how can we get the location if we have the SAS URI of the storage account. Thanks for the help.

  • re: Windows Azure REST API Simple Sample and Tool

    Hi Stephen, I have downloaded the solution and successfully created new VM instances, however I can't remote the newly created instaces via RDP, did I missed something here?
  • re: Windows Azure REST API Simple Sample and Tool

    Hello.  Very sorry, but at this point this code is probably outdated.

    At some point, Azure stopped making RDP available by default.  That was done after this tool was released.  So I think the XML to create the VM would need to be updated.  

    In the meantime, I think you could use the Azure Management portal to add the RDP Endpoint to the VM.

    Hope this helps.

Page 1 of 1 (3 items)