Windows Azure BizTalk Service REST API

The BizTalk Service in Windows Azure can be managed through a REST API. The API provides programmatic access to much of the functionality available through the Management Portal. With the REST API for managing BizTalk Services you can perform the following operations:
  • Register BizTalk Service
  • Create or Update a BizTalk Service
  • Get Cloud Service
  • Get Cloud Services
  • Get BizTalk Service Properties
  • Suspend BizTalk Service
  • Resume BizTalk Service
  • Restart BizTalk Service
  • Poll on an Async Operation on BizTalk Service
  • Sync Access Control Keys
  • Delete BizTalk Service
  • Backup BizTalk Service
  • Restore Azure BizTalk Service from Backup
In this post I like to show how you can leverage the REST API to manage BizTalk Service by means of a windows form application.

Security


To send request messages through the operations of the API you will need to have authentication in place. The REST API like the Windows Azure Service Management API uses mutual authentication of management certificates over SSL to ensure that a request made to the service is secure. Note that anonymous requests to the API are not allowed. Therefor requests made to the REST API for managing WABS requires that a management certificate is associated with your subscription. This certificate can be self-signed using the makecert command line tool or a commercial one obtained through VeriSign or Go Daddy. See the MSDN article Create and Upload a Management Certificate for Windows Azure.


REST API for BizTalk Services


The REST API for BizTalk Services is documented on MSDN. Each operation mentioned in the introduction is documented. The Request URI, URI Parameters, Request Header, Request Message, Request Elements, Response, Status Code, Response Header, and Response Body of each operation is described.

A common operation to perform before any other operation is the Get Cloud Services. This general operation will provide you with the details of your BizTalk Service(s). The Get Cloud Services will get all BizTalk Services within all cloud services. With the data provided by these operations you can perform any other operations as it will provide you with a common piece information the cloud-service-name. This is the unique name for the cloud service that hosts your BizTalk Service.


Get Cloud Services operation



To perform the Get Cloud Services operation from the REST API in a Windows Form you need to provide the subscription id, which is your Azure subscription ID. You can find this id by going to the settings page of your Windows Azure Portal.




The request will be as follows:



The response will look like:



As you see the response provides a list of resources i.e. BizTalk Services and its details like State, Edition, and tracking details.

Get BizTalk Service Properties

Sending a request to the Get BizTalk Service Properties operation will provide you the properties of a specific Windows Azure BizTalk Service. You specify in your request the subscription id of your Azure Account, Cloud Service Name (which can be obtained through the Get Cloud Services operation) and the resource name (name of one of your BizTalk Service(s)).

The request will have the following format:
  • https://management.core.windows.net/subscription-id/cloudservices/CloudServiceName/resources/biztalkservices/~/biztalk/resource-name/properties


The response might look like:




You see all the details of the request BizTalk Service in the response message.

Delete BizTalk Service

Sending a request to the Delete BizTalk Service operation will result in the deletion of the BizTalk Service. You specify in your request the subscription id of your Azure Account, Cloud Service Name (which can be obtained through the Get Cloud Services operation) and the resource name (name of one of your BizTalk Service(s)).

The request will have the following format:

  • https://management.core.windows.net/{subscription-id}/cloudservices/{cloud-service-name}/resources/biztalkservices/biztalk/{resource-name}


The response might look like:



The status code is 202, which means the operation was successful. You can call to check the asynchronous result through GET operation with URL provided Request URI.



If you check within the Windows Azure Portal under BizTalk Services you will see that the specified BizTalk Service is no longer present.

This post I demonstrated how you can leverage the REST API to manage the BizTalk Services. As an example a windows form application implements a few of the REST API operations for WABS. Three operations were discussed yet you can implement any of the other operations in a similar way using .NET code.

There are different ways you can leverage the API other than using a Windows Form Application. You could choose to use ASP.NET or a Mobile application. The REST API for BizTalk Service is created by Microsoft to enable you to perform various operations on the BizTalk Services. Microsoft offers various other REST API’s to manage other services offered in Windows Azure.

The code of the WABS Manager can be obtained through MSDN Code Gallery: Windows Azure BizTalk Services Manager

Note that not all the operations have been implemented in the tool. You reuse the code to create your own full fledged WABS Manager.

Cheers,

Steef-Jan

Comments

Wow great information... I appreciate Your post greatly..really it is too good...
Dash Inspectorate

Popular posts from this blog

DTAP Strategy: Pricing and Licensing

Table Operation on Oracle 11g XE with OracleDbBinding

Integration, the community blasting into 2017!