Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

API designing - best practice and how to support multiple versions

What is the best way to design the API's which supports multiple versions. How do I ensure that even if the schema of my data changes(minor changes), the consumers of my api's are not affected? Any reference architecture, guidelines is really helpful.

like image 854
Sampat Avatar asked Jan 16 '12 20:01

Sampat


People also ask

How do I keep multiple versions of API?

For simple APIs you can maintain different versions by defining a Constant in your app. This constant will be the path to the root of your API endpoint. Typically this would carry the same name as your app's version, like "myApp/v1-8-5/" assuming your app version was 1.8.


1 Answers

Mark Nottingham has a good blog post on how to version Web (REST) APIs

http://www.mnot.net/blog/2011/10/25/web_api_versioning_smackdown

Also about API versioning in general:

http://theamiableapi.com/2011/10/18/api-design-best-practice-plan-for-evolution/

like image 119
Ferenc Mihaly Avatar answered Sep 23 '22 03:09

Ferenc Mihaly