Correct way to version a asp.net WebApi

3.2k Views Asked by At

I am just about to go live with an api that I wrote using the new webapi.

I want to futureproof via some kind of versioning for the api - meaning if a client starts using the api straight after release I don't want them to have to go back and update their code with any changes I may make.

I can think of a couple of ways of applying a versions.

  1. //myapi.com/foo?bar=1234&v1
  2. //myapi.com/v1/foo?bar=1234

What are most people doing? I want to follow best practises but I also want the api to be clean to manage.

Suggestions are most welcome :)

1

There are 1 best solutions below

0
petro.sidlovskyy On BEST ANSWER

Web API is nothing like another way to write RESTful services. Please to this thread for more details Best practices for API versioning?