Smartitectures
'Simplicity is the ultimate sophistication' - Leonardo da Vinci

Architecture

Posts

REST APIs and Fiddler

Developers have been using Fiddler for years to troubleshoot and tune HTTP applications. With end-user services being provided through REST APIs, the Fiddler tool can be used as both a learning and testing tool. For example, MS Azure provides an extensive REST API for IaaS and PaaS services. You can model how your applications or tools will utilize these services by observing the HTTP payloads in Fiddler.

Note: As Azure uses secure HTTPS, be sure to enable the decoding feature for Fiddler ( ** BUT ONLY IN A TEST ENV ** )

This simple example is an Azure VM shutdown request using REST.  Here is the portal view of the activity I tracked in Fiddler:

After clicking the shutdown  button, the following HTTP request was created:

Here is the JSON that was posted:

This example is a little more interesting--I am creating a new SQL Server VM from the gallery:

After submitting the request the following POST was generated:

And here is a snippet from the JSON payload that was used to provision the VM:

The final cool thing I would like to mention is that you can replay REST posts with Fiddler.  In this example, I am going to create a second SQL Server by composing the request with Fiddler. I simply copied the raw request, made one edit to the server name and re-posted it:

This REST post resulted in a new VM being provisioned:

steve kurtzazure, vm, REST, Fiddler, POST, replay, test