DEV Community


Discussion on: REST API versioning with ASP.NET Core

dishanx profile image

Good post.
Is it possible to use URL path versioning and header API versioning combination? I added URL versioning support to my API but it breaks access to the old URL(api/authors). now I have to specify version in the URL(api/v1.0/authors). but some of the client apps use that old URL. are there any solutions for that?

prayatna profile image
Prayatna Bhattarai

You can try adding two url paths like
for your base controller so that it uses both url

99darshan profile image
99darshan Author

Yes you could use multiple versioning schemes. Supporting multiple versioning Schemes section in this article has an example on how to implement both the query params versioning scheme and request header versioning scheme.