In the previous post, I briefly introduced you to the IApiExplorer which can be used to generate documentation, machine-readable metadata, or a test client. In this blog post, we’re going to take a closer look at the ApiExplorer, which is the default implementation of IApiExplorer, and see how we can use it to generate a simple help page. A help page is nothing more than a web-based documentation for your web APIs. It can contain information like the resource URIs, the allowed HTTP methods and the expected parameters so that other developers who consume your APIs know how to call them. What’s great about this help page is that it will automatically update the content when you modify your APIs.
Now let’s get started by looking at the ApiExplorer.
Here are some useful resources that I have been compiling with regards to the new ASP.NET MVC4 (RC) Web API, which provides us with a rapid, testable web API built around MVC and REST. No more WCF for web HTTP APIs!
To quote Microsoft on Web API:
ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework.
So, a list of resources, in no particular order:
- ASP.NET WebAPI: Getting Started with MVC4 and WebAPI
- ASP.NET MVC 4 – Web API
- Dependency Injection in ASP.NET MVC 4 and WebAPI using Unity
- Your First ASP.NET Web API (C#)
- Routing in ASP.NET Web API
These resources are related to Windows Azure Access Control Service and security in general with Web API.
- ASP.NET MVC 4 WebAPI authorization
- Basic Authentication with Asp.Net WebAPI
- Using Azure ACS (Access Control Service) with ASP.NET Web API
- Is there a JSON Web Token (JWT) example in C#?
- JsonWebToken (WCF)
- Thinktecture.IdentityModel and ASP.NET Web API
- Thinktecture.IdentityModel.45 source code
- ASP.NET-WebApi-Security source code
- Thinktecture.IdentityModel.Http source code
- Windows Azure Access Control Service 2.0
- Windows Azure Access Control Service-Understanding the Security Buzzwords
- How to Authenticate Web Users with Windows Azure Access Control Service
Finally, there is a iOS toolkit designed to help iOS developers work with ACS:
Today we are going to build a neat HTML5 file uploader using ASP.NET Web API and jQuery. We are also going to include knockout.js to keep the list of uploaded files updating smoothly in real time. In addition to all that, we will leverage on HTML5 drag and drop events , as well as HTML5 File API, to provide the file input to the application. Finally, we will use FormData JS interface to build up the request, and we will use ApiController of our ASP.NET MVC 4 application to pick up the files and save them on the server using an instance of MultipartFormDataStreamProvider.