Diver Dan
Diver Dan

Reputation: 9963

Correct way to version a asp.net WebApi

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 :)

Upvotes: 1

Views: 3392

Answers (1)

petro.sidlovskyy
petro.sidlovskyy

Reputation: 5093

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

Upvotes: 2

Related Questions