views:

48

answers:

2

Possible Duplicate:
REST api versioning (only version the representation, not the resource itself)

Hello,

So I need to version my restful services. I understand that many place v1 or something similar in the URL to denote use of the "first version" of a resource. My question is, where in the URL should the versioning portion go?

Most people do the following:

http://myDomain.com/v1/pictures/etc

However, I'm thinking that the following makes more sense:

http://myDomain.com/pictures/v1/etc

This denotes that you want to use version 1 of the "pictures" resource, however you could use a different version of other resources. What are people's thoughts on this?

Thanks

+1  A: 

It doesn't matter. If it's "restful", the client can discover the location by following links (be it in hypertext or in headers).

Julian Reschke