I\'m trying to version my API like Stripe has. Below is given the latest API version is 2.
/api/users
returns a 301 to /api/v2/users
If at all possible, I would suggest rethinking your urls so that the version isn't in the url, but is put into the accepts header. This stack overflow answer goes into it well:
Best practices for API versioning?
and this link shows exactly how to do that with rails routing:
http://freelancing-gods.com/posts/versioning_your_ap_is