M
M
Mikhail Ivanov2017-05-31 13:10:01
API
Mikhail Ivanov, 2017-05-31 13:10:01

Web API versioning?

I am developing a Web API using ASP.NET MVC.
Suppose, over time, you need to add a new method to the API. It turns out that all other methods are V1, and the new one is V2. It is not clear to me how the user will access the API. What happens if he requests the V1 method with a url corresponding to V2.
For example: version 1 has an audio entity and users can work with it at api.com/v1/audio. In the second version, I decide to add a video (api.com/v2/video). What happens if the user requests v2/audio?
Perhaps I misunderstand the process of versioning. If so, please explain how.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sisn, 2017-05-31
@sisn

For example: version 1 has an audio entity and users can work with it at api.com/v1/audio. In the second version, I decide to add a video (api.com/v2/video). What happens if the user requests v2/audio?

If you assume that V2 includes ONLY OPTIONS to V1, then /v2/audio should give you an error

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question