URI versioning, such as /v1/foo, is one of the most used methods for versioning APIs. Clients can easily comprehend it, but as your API develops, it may become challenging to manage. However, a date versioned header-based API versioning can be a little more opaque for clients, but when done properly, it provides flexibility and maintainability.
Let’s get a gist of both approaches.
