News for hackers. Stuff that matters.
Re:Ask HN: Version numbers in a REST API by dazzawazza on Saturday July 17, 2010 @09:31AM (#1523735)
personally I would put the API version as an argument to the URL and I would make it a requirement. Most developers likes strict requirements, no developer likes surprises either.

/api/getstuff?v=1.1&arg1=x&arg2=y

If the version isn't there just return a useful error.

The only downside to this is that it's slightly more difficult to do analytics on the URL requests coming in.

Re:Ask HN: Version numbers in a REST API by mahmud on Saturday July 17, 2010 @09:55AM (#1523773)
The #1 danger to your API's usability is the half-assed implementation a 3rd-party will release to the public without your prompting or involvement. Don't let that happen. Take initiative and release libraries for as many languages and frameworks as you can, or risk the danger of being sabotaged by someone's indifference, or most likely incompetence.

You can't believe how many time I have had problems with an API just to discover the 3 year old client library was using some "sensible defaults" for required arguments.