• 2 min read

Introducing the Windows Azure Service Management API

Today, we are releasing a preview of the Windows Azure Service Management API to help you manage your deployments, hosted services and storage accounts. This is a REST-based API which users can code…

Today, we are releasing a preview of the Windows Azure Service Management API to help you manage your deployments, hosted services and storage accounts. This is a REST-based API which users can code against in their toolset of choice to manage their services.

API Details at a glance

  • You can find the documentation (along with the rest of the Windows Azure documentation) here.
  • This is a REST-based API which uses X509 client certificates for authentication. Users can upload any valid X509 certificate in .cer format to the Windows Azure developer portal and then use it as a client certificate when making API requests.
  • The following operations are currently supported.
    • Deployments – Viewing, creating, deleting, swapping, modifying configuration settings, changing instance counts, and updating the deployment.
    • Listing and viewing properties for hosted services, storage accounts and affinity groups
  • We’ve put together a small tool called csmanage.exe to help you interact with this API and manage your deployments. You can find csmanage here along with our other samples.

How do I get started?

The documentation has detailed information on this but here’s a quick starter.

  1. The first step is to get hold of a valid X509 certificate with a key size of at least 2048 bits. One quick way is to use IIS 7 to generate a self-signed certificate. Another option is to use makecert.exe (which ships with the Windows SDK) and use a command like the below:
    makecert -r -pe -a sha1 -n "CN=Windows Azure Authentication Certificate" -ss My -len 2048 -sp "Microsoft Enhanced RSA and AES Cryptographic Provider" -sy 24 testcert.cer
  2. The next step is to upload the .cer file to the developer portal to let Windows Azure know that it should trust the certificate for API operations on your projects. The portal now has a new section called “API Certificates” under the Account tab where one can do this. clip_image002
  3. Use the certificate from step  #1 for any API request you make. The csmanage tool is a handy way to play and explore the functionality offered by the API. For users rolling their own tools, almost all mainstream programming platforms have support for client certificates. .NET users should use the ClientCertificates property of System.Net.HttpWebRequest. We’ll also be publishing client libraries to simplify this task soon.

In the pipeline

Over the next few weeks, we’ll publishing a sample .NET client library and samples, all with source code, to show how to use the API’s functionality.  This API is currently in CTP form and users should expect changes as we improve the service based on feedback.

As always, we welcome any feedback. Play with the API and tell us what you think!