0

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

Community
  • 1
  • 1
DigitalZebra
  • 39,494
  • 39
  • 114
  • 146

2 Answers2

1

This question has been covered here REST api versioning (only version the representation, not the resource itself)

and here:

How to version REST URIs

Community
  • 1
  • 1
Darrel Miller
  • 139,164
  • 32
  • 194
  • 243
1

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
  • 40,156
  • 8
  • 95
  • 98