You are on page 1of 2

Rest API Versioning:

Why is versioning improvement?

Requirement change

users rely on the API

URI path Versioning:

This is the most commonly used and straightforward approach while versioning a REST API. Let’s take an
example of following resources – products and customers.

https://hostname/v1/products

https://hostname/v1/customers

Let’s assume that we are introducing groundbreaking changes to the REST API, to represent this, we
introduce a new version to our REST API resource structure

https://hostname/v2/products

https://hostname/v2/customers

URI parameter versioning:

Append version as a query parameter.

http//locaolhost:8000/api/customers?v1=1.1

Versioning using Custom Header:

Accept-version: v1

Accept-version: v2

You might also like