4 ms·
Regarding API versioning, FTA: > There are mixed opinions around whether an API version should be included in the URL or in a header. Academically speaking, it
by rumanator 7y ago
Regarding API versioning, FTA:
> There are mixed opinions around whether an API version should be included in the URL or in a header. Academically speaking, it should probably be in a header. However, the version needs to be in the URL to ensure browser explorability of the resources across versions (remember the API requirements specified at the top of this post?).
I don't see how this is relevant with a RESTful API. In REST, resources are transparent and found through HATEOS/autodiscovery. Thus it's really irrelevant if the URL found through HATEOS includes an API version or not.
However, URL versioning is a indeed a side effect of having multiple services dedicated to serve each version of an API.
In the end, it doesn't feel like path/media type versioning is a relevant issue because it's not an either/or type situation but actually complementary.
- PretzelFisch 7y agoWhen you see versioning it's a pretty good hint that they use is as a buzz word and it's just RPC wrapped in REST clothing
- rumanator 7y agoRPC-over-HTTP passed off as REST is indeed a nuisance but unfortunately that doesn't get rid of the need to support multiple versions of the same API, specially if you don't control which clients are consuming your services.