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

Windows Azure REST API Sample and Tool – GET, POST, & DELETE with One Click

BizTalk Blogs

This group is for blogs related to BizTalk Server. This includes Community Syndicated blogs and Stephen W. Thomas’s blog.

Stephen W. Thomas BizTalk MVP

Insight and guidance on Microsoft BizTalk Server, Windows Azure, Infrastructure as a Service, and related Microsoft technologies.

Windows Azure REST API Sample and Tool – GET, POST, & DELETE with One Click

Rate This
  • Comments 4

Windows Azure has a few different, somewhat disjointed, toolsets available to create new artifacts and maintain existing ones.  The best known is the Web Portal.  Very quickly when working with the web portal you discover the portal is not able to do all the tasks needed to support development and maintenance.  This brings into play Windows Azure PowerShell Commands, a .Net SDK, and REST API. 

If you are new to working with the Windows Azure REST API or if you are looking for sample code working with the Windows Azure REST API, this tool can help you.

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.

Download: Windows Azure REST API Sample Tool

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. 

Windows Azure REST API Sample Tool

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. 

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
  • Interesting Finds: October 9, 2012

  • Currently the Windows Azure Management Portal is having some difficulty using the UI to create an Image

  • we are trying the above way to access the api calls.

    bt i am getting the below error :

    Error making REST API call.

    Cannot find the requested object.

    i am just tring to retrive the locations from azure portal .I am suspecting that we have a some cerificate problem.

    can you please eloborate on this issue with proper steps.



  • The best place to get help on REST API configuration issues is the Microsoft site -

    It goes through setup step by step.

Page 1 of 1 (4 items)
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