Microsoft Introduces IIS Administration API

The IIS team has been working on a new RESTful API in order to manage your IIS configuration. While this is still under development, the team was extremely eager to share a preview of the new API. The API allows configuration of IIS resources such as authorization rules, modules, and applications.
 
The API has been built with Hypertext Application Language (HAL) in order to allow the APIs to built –in discoverability.
 
Microsoft states,
 
“Starting at the root of the API, you can browse the entire API surface.”
 
Alongside to the API, the IIS team has also gone on to built an API explorer which would make it simple to browse the entire API surface.
 
 
Image Source: blogs.iis.net
 
The company states,
 
“Today we want to not only let everyone know that we are working on a REST API for IIS, we also want to let you see it. The API that we have created has a built in tool called the API Explorer that allows those with access to the API to browse the entire API surface. This means once you have a link to the root URL of the API you can navigate to this tool and browse all of the API that is available. Here is a picture of the API Explorer in action displaying an application pool resource.”
 
Through this API Explorer you will now be able to browse the configuration resources of IIS such as authorization rules, modules as well as applications. You can also delete these resources, modify them and even create a new one.
 
The company states,
 
“We have deployed a read-only version of the API to a virtual machine in Azure to allow those who wish to explore the new API a chance to do so.”
 
The API which is available on this machine could easily be accessed via simple HTTP clients such as cURL, however for the very first experience; Microsoft recommends that you should view the API Explorer in order to see what the tool has to offer.
 
Microsoft states,
 
“Before connecting to this API let’s touch on the current authentication mechanisms that are in place to help keep it locked down. By default, the entire API is locked down with Windows authentication so that only administrators have access. This default behavior can be modified because, as is the case with many REST APIs available today, the Microsoft IIS Administration API mandates that an Access Token be sent with every request to the API. These access tokens can only be generated by Administrators on the machine that the API is installed on. In practice access tokens would be assigned to a specific user or group. For the purposes of the demo we have generated an access token for public use.”
 
When you initially connect to the API Explorer, you will be able to see the following screen.
 
 
Image Source: blogs.iis.net
 
Microsoft has relaxed the requirement for Windows authentication in order to connect to the demo API. This means that only authentication mechanism is required in order to access the token. Once you input your access token into the input form and click connect, you will be able to gain full access to the API in the API Explorer tool from your browser.
 
The API has been built with HAL (Hypertext Application Language). Utilizing HAL allows APIs to have built in discoverability. For more information check the official blog.