Introduction to Web API Versioning

Versioning of API is required especially if you are providing services for the public. It is also a way of your APIs to support forward and backward  compatibility. Through versioning, you can’t affect the existing customers and break their applications which depends on your API.

By default, the Web API routing logic finds the controller by class name. The controller selection is handled internally by Web API through DefaultHttpControllerSelector that implements IHTTPControllerSelector.SelectController. We cannot version Web API’s with the default controller selector but we can plug in our custom implementation for selecting the right version at run time. By implementing IHTTPContrllerSelector interface, you can create a custom API easily.

Read the rest of the article here:

Leave a Reply

Your email address will not be published. Required fields are marked *