1
Reply

What is the most common method of versioning a REST API?

John Kocer

John Kocer

6y
163
0
Reply

    There are many ways to version a REST API: • URI-based (URL PATH SEGMENT) versioning GET /api/Items HTTP 1.1 GET /api/v2/Items HTTP 1.1 • Header-based (HTTP Header/Custom Header) versioning GET /api/Items HTTP 1.1 GET /api/Items HTTP 1.1 ApiVersion: 2 • Query String Parameter Versioning /api/hi?api-version=2.0 • Media type-based versioning GET /api/Items HTTP 1.1 Accept: application/vnd.smartit.esale.webapi+json GET /api/Items HTTP 1.1 Accept: application/vnd.smartit.esale webapi-v2+json• Currently the most common method of versioning ASP.NET Web API is; URI-based (URL PATH SEGMENT) versioning GET /api/Items HTTP 1.1 GET /api/v2/Items HTTP 1.1