--
You received this message because you are subscribed to the Google Groups "API Craft" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-craft+...@googlegroups.com.
Visit this group at https://groups.google.com/group/api-craft.
For more options, visit https://groups.google.com/d/optout.
I believe most practitioners who have supported multiple APIs over a multiple year lifespan will disagree with that guidance for all but a few scenarios where it is easy to synchronize client and server deployment.
If has been popular guidance for a while now, and it is commonly deployed. However, if you really care about your customers and the longevity of your API, I believe it is time to stop.
Darrel
--
Jay,
From: api-...@googlegroups.com [mailto:api-...@googlegroups.com] On Behalf Of Jay C
@Darrel, so if using a version number in the url (left most is preferred) is wrong then what is the right solution?
The right solution to what problem?
I really this sounds like I’m being difficult, but the reality is there is no simple answer to the challenge of managing change. Versioning at the left of a URL is a sledgehammer approach to versioning. Dealing with change at resource, link relation and media type level is a much more gentle approach.
As a more concrete example, if you have a /api/customer/{id} class of resource and you _really_ need to make a breaking change, then creating a /api/customer/v2/{id} resource that will sit alongside the original is a more friendly way of introducing the change.
Having said this, I believe that many cases where breaking changes to an API are needed could have been avoided with some up front planning and some guidance to customers on how to build client code that would be resilient to potential future changes.
There are a couple of talks that I do that dig deeper into this subject
Crafting Evolvable Web API Representations
Consuming REST APIs
and I talk about many of the same things in the chapter I wrote in “Designing Evolvable Web APIs” which you can read online for free here http://chimera.labs.oreilly.com/books/1234000001708
Darrel
--
Darrel
>From: api-...@googlegroups.com [mailto:api-...@googlegroups.com] On Behalf Of Kijana Woodard
>I just don't like statements that purport "best practices" to go unchallenged. :-D
I’m 100% behind you on that.