Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8670113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:38:16+00:00 2026-06-12T18:38:16+00:00

Possible Duplicate: How to version REST URIs I’m currently writing a REST service and

  • 0

Possible Duplicate:
How to version REST URIs

I’m currently writing a REST service and I would like to get some ideas on how my clients can specify the service version when making a request.

For example when I upgrade my REST server to version 2 I don’t want calls to break for all clients that have implemented version 1 of my service.

I’ve seen others add the version in the url or specify the version in the header somewhere.

There may not be a “best” way to implement this but I would appreciate some thoughts on the subject( pro’s and con’s of each etc…)

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:38:17+00:00Added an answer on June 12, 2026 at 6:38 pm

    We do it via separate routes:

     http://my.service.com/v1/user/1
    
     http://my.service.com/v2/user/1
    

    In the case of no change between versions, we just map the route to the controller that services the v1 version of the resource.

    Yes, this does create multiple URL’s for the same resource, and the wonky hardcore REST evanginlists will start crying, but this way makes it easy to manage for you and your users. I find users can’t even use request headers to set things like content types nevermind an X-Path or something like that to handle versioning….

    If you really want to avoid the duplicate resource issue, you couldpass in a get paramter like version:

     http://my.service.com/user/1?version=1
    

    If no version, default to whatever. This is actually fully REST dogmatic, but I think it puts a lot onto your API users.

    You could do some kind of user lookup table to route between version if you have a way to map user or api key to version, but this is pretty crazy overhead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Sql server version problem when database restore I would like to restore
Possible Duplicate: How to get the current OS version of Windows Phone? How to
Possible Duplicate: C#/WPF: Toolkit DataGrid - Transpose rows and columns I would like to
Possible Duplicate: Details of Assembly version How does the Assembly Version get generated in
Possible Duplicate: Determine framework (CLR) version of assembly I need to get the CLR
Possible Duplicate: Get jQuery version from inspecting the jQuery object Pretty much that.. I
Possible Duplicate: Check iPhone iOS Version I am trying to setup some code that
Possible Duplicate: How to get current EF version In my windows forms application, I
Possible Duplicate: Make iPhone app paid version replace free version on install from app
Possible Duplicate: harmonic series with x86-64 assembly trying to do a version of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.