I've evaluated a number of versioning schemas for REST apis (header, url, …). So far, the most reliable approach seems to be the url option: It works with proxies, and does not rely on obscure schemas such as dates for versioning.
Now, when I look around, everybody who uses the url based approach seems to use versions such as v1
, v2
, and so on. Nobody uses minor versions, or even a schema such as semantic versioning.
This raises some questions:
- When do you increase the version number of a REST api (for sure, you have more updates to it than just once in five years)?
- If you just have a bug fix, you probably do not increase the version number, but how do you differ both versions?
- If you use a very fine-granular approach, you end up with lots of versions you need to host in parallel. How do you handle that?
In other words: How does a company such as GitHub, e.g., make to only have v3
today (2015), when they are around in business already for 7 years now? Does that mean that they actually only changed their api two times? I can hardly believe that.
Any hints?