REST API Http versioning
Common ways to go about it would be :-
1. URL versioning
An example would be :-
https://adventure-works.com/v2/customers/3
:2. Query string versioning
https://adventure-works.com/customers/3?version=2
3.Header versioning
GET https://adventure-works.com/customers/3 HTTP/1.1 Custom-Header: api-version=1
4. Media type versioning - this is more for client trying to digest the media type data content. For example, the data content supported by the client should be of pdf version 2.
GET https://adventure-works.com/customers/3 HTTP/1.1 Accept: application/vnd.adventure-works.v2+pdf
Comments