Have you been tracking opinions on the “right” way to version REST API’s? Don’t miss out on the fun! If you’d like to get a brief overview of the matrix of possibilities, check out Troy Hunt’s Your API Versioning Is Wrong. Although this is an oldie, it’s definitely a goodie! Reading it will give you a brief glimpse into the religious nature of REST advocates.
In case you’re of the TLDR persuasion, here’s a quick summary:
Premises
- REST proposes that the URL (sans query) specifies the resource.
- Services need some manner of versioning. IOW, it’s impossible to design and implement the perfect service which never changes.
Problems
- Does that mean that service API’s (URL) should be versioned? Well, that depends on your religious views. Does the resource really change?
- Oh, so the representations should be versioned? Maybe. It really depends on your religious views.
So stick around to get *all the answers in Part II!
* – refers to opinions you’re likely to disagree with, possibly with religious fervor.