<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Versioning REST Web Services</title>
	<atom:link href="http://barelyenough.org/blog/2008/05/versioning-rest-web-services/feed/" rel="self" type="application/rss+xml" />
	<link>http://barelyenough.org/blog/2008/05/versioning-rest-web-services/</link>
	<description></description>
	<pubDate>Thu, 04 Dec 2008 07:15:03 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Mark Nottingham</title>
		<link>http://barelyenough.org/blog/2008/05/versioning-rest-web-services/#comment-66705</link>
		<dc:creator>Mark Nottingham</dc:creator>
		<pubDate>Wed, 03 Dec 2008 06:04:25 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=335#comment-66705</guid>
		<description>&lt;p&gt;Very well said.&lt;/p&gt;

&lt;p&gt;The only thing I'd add is that new versions should be rare; the real value of REST (and the rest, ahem, of the Internet architecture) comes from stable, well-understood formats, not localised ones that change every week.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Very well said.</p>
<p>The only thing I&#8217;d add is that new versions should be rare; the real value of REST (and the rest, ahem, of the Internet architecture) comes from stable, well-understood formats, not localised ones that change every week.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Links for 2008-10-13 [del.icio.us] - Technology Info</title>
		<link>http://barelyenough.org/blog/2008/05/versioning-rest-web-services/#comment-63749</link>
		<dc:creator>Links for 2008-10-13 [del.icio.us] - Technology Info</dc:creator>
		<pubDate>Mon, 03 Nov 2008 13:06:33 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=335#comment-63749</guid>
		<description>&lt;p&gt;[...] Versioning REST Web Services [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[&#8230;] Versioning REST Web Services [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Williams</title>
		<link>http://barelyenough.org/blog/2008/05/versioning-rest-web-services/#comment-62852</link>
		<dc:creator>Peter Williams</dc:creator>
		<pubDate>Thu, 16 Oct 2008 23:41:00 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=335#comment-62852</guid>
		<description>&lt;p&gt;Michael Case,&lt;/p&gt;

&lt;p&gt;This approach assumes that the application wants to support multiple versions of it's API simultaneously.  As Michal Migurski pointed out you might decide that is not acceptable.  In my experience truly non-versionable API changes are actually fairly rare, but deciding that you will not invest the effort to support multiple versions is quite reasonable.  Assuming, of course you are willing to accept that some changes you might want to make to your API will break many, or all, of the clients.&lt;/p&gt;

&lt;p&gt;As for point 2 I don't think that is oversimplified.  If the client is only using URL it has extracted from the server responses and it is following the documented semantics of the server responses, it should not be a problem.  For example, if the semantics of the API say you can update an item by PUTing a modified version of the representation to the URI found at &lt;code&gt;./link[rel='edit']/@href&lt;/code&gt; of the original representation, the only way that can go wrong is because of a bug.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Michael Case,</p>
<p>This approach assumes that the application wants to support multiple versions of it&#8217;s API simultaneously.  As Michal Migurski pointed out you might decide that is not acceptable.  In my experience truly non-versionable API changes are actually fairly rare, but deciding that you will not invest the effort to support multiple versions is quite reasonable.  Assuming, of course you are willing to accept that some changes you might want to make to your API will break many, or all, of the clients.</p>
<p>As for point 2 I don&#8217;t think that is oversimplified.  If the client is only using URL it has extracted from the server responses and it is following the documented semantics of the server responses, it should not be a problem.  For example, if the semantics of the API say you can update an item by PUTing a modified version of the representation to the URI found at <code>./link[rel='edit']/@href</code> of the original representation, the only way that can go wrong is because of a bug.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Case</title>
		<link>http://barelyenough.org/blog/2008/05/versioning-rest-web-services/#comment-62849</link>
		<dc:creator>Michael Case</dc:creator>
		<pubDate>Thu, 16 Oct 2008 22:28:26 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=335#comment-62849</guid>
		<description>&lt;p&gt;I like the idea, seems fundamentally cleaner than putting version info in the request URL, for the reasons stated above.  Some questions/issues:&lt;/p&gt;

&lt;p&gt;1) Seems the service is now locked into supporting multiple representations of the same object.  Doesn't this get difficult to manage over time?&lt;/p&gt;

&lt;p&gt;2) This quote seems overly simplified:  "Well, if the client is following the HATEOAS principle it will never attempt to create a resource that is not supported by the server."  I think the question was valid (post #4 above), though I don't have a very good answer, either, other than to just say always keep the server newer than the client...&lt;/p&gt;

&lt;p&gt;Thoughts?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I like the idea, seems fundamentally cleaner than putting version info in the request URL, for the reasons stated above.  Some questions/issues:</p>
<p>1) Seems the service is now locked into supporting multiple representations of the same object.  Doesn&#8217;t this get difficult to manage over time?</p>
<p>2) This quote seems overly simplified:  &#8220;Well, if the client is following the HATEOAS principle it will never attempt to create a resource that is not supported by the server.&#8221;  I think the question was valid (post #4 above), though I don&#8217;t have a very good answer, either, other than to just say always keep the server newer than the client&#8230;</p>
<p>Thoughts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pigsaw Blog &#187; Blog Archive &#187; Bookmarks for 15 Oct 2008 to 16 Oct 2008</title>
		<link>http://barelyenough.org/blog/2008/05/versioning-rest-web-services/#comment-62835</link>
		<dc:creator>Pigsaw Blog &#187; Blog Archive &#187; Bookmarks for 15 Oct 2008 to 16 Oct 2008</dc:creator>
		<pubDate>Thu, 16 Oct 2008 10:03:58 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=335#comment-62835</guid>
		<description>&lt;p&gt;[...] Peter Williams - Versioning REST Web Services [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[&#8230;] Peter Williams - Versioning REST Web Services [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michal Migurski</title>
		<link>http://barelyenough.org/blog/2008/05/versioning-rest-web-services/#comment-62834</link>
		<dc:creator>Michal Migurski</dc:creator>
		<pubDate>Thu, 16 Oct 2008 04:47:48 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=335#comment-62834</guid>
		<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I like the approach you describe here, but the majority of changes I've seen to web services have been of a non-versionable variety: often they are made necessary by sub-surface application changes that make the old forms impossible to serve. In your example, perhaps the application no longer wishes to expose e-mail addresses at all, or the service provider decides to start supporting a new authentication scheme, both for security reasons? In neither of these cases would it be advisable to offer anyone the old representation.&lt;/p&gt;

&lt;p&gt;I definitely share your distaste for sticking version numbers in the URL. The first place I saw this antipattern was in the Del.icio.us API back in 2004. They're still hosting it from the old domain, still promising to "deprecate early versions aggressively", and still at version 1, where they will stay for as long as the service remains online.&lt;/p&gt;

&lt;p&gt;We had this debate when we were designing Digg's API, and decided early that version numbers made no sense because they were only defensible for the most inconsequential of changes. The old Del.icio.us is no longer available, you can't rev back to last season's TV schedule, stores don't honor outdated coupons, and web services start and stay at version "now".&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I like the approach you describe here, but the majority of changes I&#8217;ve seen to web services have been of a non-versionable variety: often they are made necessary by sub-surface application changes that make the old forms impossible to serve. In your example, perhaps the application no longer wishes to expose e-mail addresses at all, or the service provider decides to start supporting a new authentication scheme, both for security reasons? In neither of these cases would it be advisable to offer anyone the old representation.</p>
<p>I definitely share your distaste for sticking version numbers in the URL. The first place I saw this antipattern was in the Del.icio.us API back in 2004. They&#8217;re still hosting it from the old domain, still promising to &#8220;deprecate early versions aggressively&#8221;, and still at version 1, where they will stay for as long as the service remains online.</p>
<p>We had this debate when we were designing Digg&#8217;s API, and decided early that version numbers made no sense because they were only defensible for the most inconsequential of changes. The old Del.icio.us is no longer available, you can&#8217;t rev back to last season&#8217;s TV schedule, stores don&#8217;t honor outdated coupons, and web services start and stay at version &#8220;now&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LudoA</title>
		<link>http://barelyenough.org/blog/2008/05/versioning-rest-web-services/#comment-62816</link>
		<dc:creator>LudoA</dc:creator>
		<pubDate>Wed, 15 Oct 2008 08:13:23 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=335#comment-62816</guid>
		<description>&lt;p&gt;Thanks a lot for the very clear(!) explanations - it's often hard to explain a very simple thing in simple terms, but you succeeded completely :-)&lt;/p&gt;

&lt;p&gt;It makes some sense that a URI refers to resource and not to a representation -- as I originally thought it did --, given the 'R' in URI ;-)&lt;/p&gt;

&lt;p&gt;I wasn't aware of the Vary header - good to know though. The people who designed HTTP really thought this through, apparently.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks a lot for the very clear(!) explanations - it&#8217;s often hard to explain a very simple thing in simple terms, but you succeeded completely :-)</p>
<p>It makes some sense that a URI refers to resource and not to a representation &#8212; as I originally thought it did &#8211;, given the &#8216;R&#8217; in URI ;-)</p>
<p>I wasn&#8217;t aware of the Vary header - good to know though. The people who designed HTTP really thought this through, apparently.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BarelyBlogging &#187; Blog Archive &#187; links for 2008-10-14</title>
		<link>http://barelyenough.org/blog/2008/05/versioning-rest-web-services/#comment-62810</link>
		<dc:creator>BarelyBlogging &#187; Blog Archive &#187; links for 2008-10-14</dc:creator>
		<pubDate>Wed, 15 Oct 2008 00:04:56 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=335#comment-62810</guid>
		<description>&lt;p&gt;[...] Peter Williams - Versioning REST Web Services (tags: webdev xml rest) [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[&#8230;] Peter Williams - Versioning REST Web Services (tags: webdev xml rest) [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Williams</title>
		<link>http://barelyenough.org/blog/2008/05/versioning-rest-web-services/#comment-62803</link>
		<dc:creator>Peter Williams</dc:creator>
		<pubDate>Tue, 14 Oct 2008 15:28:54 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=335#comment-62803</guid>
		<description>&lt;p&gt;LudoA, A URI names a single resource which may have many representations.  Say you had chart of last years earning by month.  This chart might have a URI &lt;code&gt;http://foo.example/charts/42&lt;/code&gt;.  Serving the PNG, JPG and Flash versions of that chart from the same URL fits perfectly in to the REST model.  Each of those formats represents the same thing, the earning chart.  The various formats are just different representations of the same information.  To support this multiple representation approach we have content negotiation.  It allows the requesting agent to tell the server in what format it would prefer the information.  And it may specify more than one, each with it's own precedence.&lt;/p&gt;

&lt;p&gt;Specifying Accept as &lt;code&gt;*/*&lt;/code&gt; is vile kludge if requesting agent is going to actually interpret the representations it is getting.  But to answer your question, if the requesting agent claims it can accept any content type the server should serve which ever representation it prefers.  That might the most comprehensive version, or the one that is fastest to generate, or whatever.  The requesting agent has said "I don't care what sort of representation you give me", so the server is free to do whatever it wants.&lt;/p&gt;

&lt;p&gt;Comment #6 is either wrong or CDNs are a lot dumber than I would have expected.  Martin Atkins (comment #8) is right, in real life the responses should set the Vary header to include Accept so that caches can do the right thing -- I left it out to reduce the complexity of the examples.  If that header is set correctly it is fairly straight forward to implement caching that works correctly with content negotiation, whether it is used for versioning or for some other purpose.  The HTTP spec describes the caching algorithm for handling HTTP traffic in some detail.&lt;/p&gt;

&lt;p&gt;And yes, you can specify the content type of the body of a HTTP PUT.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>LudoA, A URI names a single resource which may have many representations.  Say you had chart of last years earning by month.  This chart might have a URI <code><a href="http://foo.example/charts/42" rel="nofollow">http://foo.example/charts/42</a></code>.  Serving the PNG, JPG and Flash versions of that chart from the same URL fits perfectly in to the REST model.  Each of those formats represents the same thing, the earning chart.  The various formats are just different representations of the same information.  To support this multiple representation approach we have content negotiation.  It allows the requesting agent to tell the server in what format it would prefer the information.  And it may specify more than one, each with it&#8217;s own precedence.</p>
<p>Specifying Accept as <code>*/*</code> is vile kludge if requesting agent is going to actually interpret the representations it is getting.  But to answer your question, if the requesting agent claims it can accept any content type the server should serve which ever representation it prefers.  That might the most comprehensive version, or the one that is fastest to generate, or whatever.  The requesting agent has said &#8220;I don&#8217;t care what sort of representation you give me&#8221;, so the server is free to do whatever it wants.</p>
<p>Comment #6 is either wrong or CDNs are a lot dumber than I would have expected.  Martin Atkins (comment #8) is right, in real life the responses should set the Vary header to include Accept so that caches can do the right thing &#8212; I left it out to reduce the complexity of the examples.  If that header is set correctly it is fairly straight forward to implement caching that works correctly with content negotiation, whether it is used for versioning or for some other purpose.  The HTTP spec describes the caching algorithm for handling HTTP traffic in some detail.</p>
<p>And yes, you can specify the content type of the body of a HTTP PUT.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2008-10-14 &#171; Brent Sordyl&#8217;s Blog</title>
		<link>http://barelyenough.org/blog/2008/05/versioning-rest-web-services/#comment-62800</link>
		<dc:creator>links for 2008-10-14 &#171; Brent Sordyl&#8217;s Blog</dc:creator>
		<pubDate>Tue, 14 Oct 2008 14:00:55 +0000</pubDate>
		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=335#comment-62800</guid>
		<description>&lt;p&gt;[...] Versioning REST Web Services Managing changes to APIs is hard. That is no surprise to anyone who has ever maintained an API of any sort. Web services, being a special case of API, are susceptible to many of the difficulties around versioning as other types of APIs. For HTTP based REST style web services the combination of resources and content negotiation can be used to mitigate most of the issues surrounding API versioning. (tags: rubyonrails restful versioning) [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[&#8230;] Versioning REST Web Services Managing changes to APIs is hard. That is no surprise to anyone who has ever maintained an API of any sort. Web services, being a special case of API, are susceptible to many of the difficulties around versioning as other types of APIs. For HTTP based REST style web services the combination of resources and content negotiation can be used to mitigate most of the issues surrounding API versioning. (tags: rubyonrails restful versioning) [&#8230;]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
