Handling message versioning in REST
All services change over time, mainly because of new business requirements. More often than not, this includes changes to the entity structure.
Following are several options available to handle entity versioning:
URL versioning: Here the URL determines the version that is to be returned. This option seems to be the most common method used, although this goes against the RESTful nature of the URL, which expresses the resource. Although this provides a very simple mechanism for versioning, it requires the server to maintain multiple versions of the URL even though you are fetching the same information.
HTTP GET: https://my_rest_service.com/api/v2/account/10043
Query string versioning: This option appends the required version number to the query string. The disadvantage of using this method is that some browsers and Internet Service Providers (ISPs) do not cache response messages when the request URL includes a query string.
HTTP GET:
https://my_rest_service...