Picture a nice, RESTy remote API where we use Postel's Maxim to reduce the amount of version-coupling a resource's XML and JSON representations has.
When the time eventually comes to dramatically alter the structure in a way that breaks compatibility, most APIs I've seen go straight for putting the version number in the URI path (eg "/context/v1/resource" or similar). However, I've also seen the use of media type to indicate version (eg Content-Type: application/json+hal+v2).
I feel the URI is "easier" and certainly more obviously apparent. I also feel the media type is a truer reflection of reality -- it's the *same resource*, just a *different representation*. If it was truly a different resource (just very similar to another), then I'm all for the URI changing.
Which do you prefer (as a consumer, producer, developer, documenter, etc), and why?
TIA,
Josh