<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Get Your API Right</title>
	<atom:link href="http://wonderfullyflawed.com/2009/07/02/get-your-api-right/feed/" rel="self" type="application/rss+xml" />
	<link>http://wonderfullyflawed.com/2009/07/02/get-your-api-right/</link>
	<description></description>
	<lastBuildDate>Thu, 11 Mar 2010 06:04:04 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Notional Slurry &#187; links for 2010-03-10</title>
		<link>http://wonderfullyflawed.com/2009/07/02/get-your-api-right/#comment-929</link>
		<dc:creator>Notional Slurry &#187; links for 2010-03-10</dc:creator>
		<pubDate>Thu, 11 Mar 2010 06:04:04 +0000</pubDate>
		<guid isPermaLink="false">http://wonderfullyflawed.com/?p=257#comment-929</guid>
		<description>[...] Get Your API Right « Trek &quot;Every project I’ve worked on in the last two years has heavily involved the use of web APIs. Libersy at the time (no idea about now) had an architecture that was extensively API based, even for communication between internal applications (an architecture I strongly argued against, bee tea dubs). Since then I’ve futzed with web APIs almost exclusively. From very narrow focused uses like University of Michigan’s Bluestream Service, to more broad but still fairly local APIs like the Ann Arbor District Library’s soon-to-be-updated API, all the way to APIs of major web applications like Twitter and Flickr. [...]</description>
		<content:encoded><![CDATA[<p>[...] Get Your API Right « Trek &quot;Every project I’ve worked on in the last two years has heavily involved the use of web APIs. Libersy at the time (no idea about now) had an architecture that was extensively API based, even for communication between internal applications (an architecture I strongly argued against, bee tea dubs). Since then I’ve futzed with web APIs almost exclusively. From very narrow focused uses like University of Michigan’s Bluestream Service, to more broad but still fairly local APIs like the Ann Arbor District Library’s soon-to-be-updated API, all the way to APIs of major web applications like Twitter and Flickr. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wonderfullyflawed</title>
		<link>http://wonderfullyflawed.com/2009/07/02/get-your-api-right/#comment-906</link>
		<dc:creator>wonderfullyflawed</dc:creator>
		<pubDate>Thu, 07 Jan 2010 21:50:29 +0000</pubDate>
		<guid isPermaLink="false">http://wonderfullyflawed.com/?p=257#comment-906</guid>
		<description>According to the spec: &quot;The POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line&quot;

In examples urls above (e.g. &quot;/photos&quot; and &quot;/photos/somephotoid&quot;) &quot;/photos&quot; is the existing resource (the collection of all photos) a POST request asks to create a new subordinate (in this case, a new photo).

PUT handles entirely new entities or, if the Request-URI represents an existing resource &quot;the enclosed entity SHOULD be considered as a modified version of the one residing on the origin server&quot;.

In this case PUT to the collection would, I&#039;m assuming, mean either create &quot;/photos&quot; as an acceptable new resource if it did not exist, or alter the resource represented at &quot;/photos&quot; in some way.</description>
		<content:encoded><![CDATA[<p>According to the spec: &#8220;The POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line&#8221;</p>
<p>In examples urls above (e.g. &#8220;/photos&#8221; and &#8220;/photos/somephotoid&#8221;) &#8220;/photos&#8221; is the existing resource (the collection of all photos) a POST request asks to create a new subordinate (in this case, a new photo).</p>
<p>PUT handles entirely new entities or, if the Request-URI represents an existing resource &#8220;the enclosed entity SHOULD be considered as a modified version of the one residing on the origin server&#8221;.</p>
<p>In this case PUT to the collection would, I&#8217;m assuming, mean either create &#8220;/photos&#8221; as an acceptable new resource if it did not exist, or alter the resource represented at &#8220;/photos&#8221; in some way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ZeissS</title>
		<link>http://wonderfullyflawed.com/2009/07/02/get-your-api-right/#comment-905</link>
		<dc:creator>ZeissS</dc:creator>
		<pubDate>Thu, 07 Jan 2010 17:30:42 +0000</pubDate>
		<guid isPermaLink="false">http://wonderfullyflawed.com/?p=257#comment-905</guid>
		<description>Are you sure you got POST and PUT right? Afaik PUT is for creating resources, not POST.</description>
		<content:encoded><![CDATA[<p>Are you sure you got POST and PUT right? Afaik PUT is for creating resources, not POST.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Code Mongrel &#124; Episode 2: A Festivus for the REST of us!</title>
		<link>http://wonderfullyflawed.com/2009/07/02/get-your-api-right/#comment-709</link>
		<dc:creator>Code Mongrel &#124; Episode 2: A Festivus for the REST of us!</dc:creator>
		<pubDate>Mon, 27 Jul 2009 10:04:02 +0000</pubDate>
		<guid isPermaLink="false">http://wonderfullyflawed.com/?p=257#comment-709</guid>
		<description>[...] Get your API right [...]</description>
		<content:encoded><![CDATA[<p>[...] Get your API right [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simone Carletti</title>
		<link>http://wonderfullyflawed.com/2009/07/02/get-your-api-right/#comment-693</link>
		<dc:creator>Simone Carletti</dc:creator>
		<pubDate>Sat, 18 Jul 2009 12:51:37 +0000</pubDate>
		<guid isPermaLink="false">http://wonderfullyflawed.com/?p=257#comment-693</guid>
		<description>Great article!
I have been planning a post like this since I wrote about Technorati API a couple of years ago http://www.simonecarletti.com/blog/2007/11/technorati-api/

I would integrate your list with the following points

1. Return request arguments in response

Including query parameters so that I can easily fetch them without the need to store/validate them everywhere. Returning request parameters also enable the developer to verify wether the API interface correctly understood my request (ex I passed foo=bar and it didn&#039;t understand foo=1 due to a cast to int).

2. Provide consistent response.

If you have multiple API methods do not change root node or change it accordingly to the request.
Also, if you use an error node to return errors, always use it.

For instance, http://technorati.com/developers/api/bloginfo.html returns an empty response with URL when the URL is not a blog, http://technorati.com/developers/api/blogposttags.html returns an error.

3. Return meaningful error messages

It&#039;s always a good idea to return an error status along with a full explanation.

4. Provide a comprehensive documentation

Also make sure your documentation is up-to-date and reflects the real API interface.

5. Do not drop old API URIs/methods, use a coherent error message or status code (410)

6. Include schema/api version in the response

In this way developer can create intelligent libraries that validates and supports multiple API versions.

7. Don&#039;t change node order or container

For instance, Technorati sometimes puts inboundblogs/inboundlinks within weblog tag (TestGetInfoSuccess.xml) and sometimes outside (BlogInfo, Cosmos).</description>
		<content:encoded><![CDATA[<p>Great article!<br />
I have been planning a post like this since I wrote about Technorati API a couple of years ago <a href="http://www.simonecarletti.com/blog/2007/11/technorati-api/" rel="nofollow">http://www.simonecarletti.com/blog/2007/11/technorati-api/</a></p>
<p>I would integrate your list with the following points</p>
<p>1. Return request arguments in response</p>
<p>Including query parameters so that I can easily fetch them without the need to store/validate them everywhere. Returning request parameters also enable the developer to verify wether the API interface correctly understood my request (ex I passed foo=bar and it didn&#8217;t understand foo=1 due to a cast to int).</p>
<p>2. Provide consistent response.</p>
<p>If you have multiple API methods do not change root node or change it accordingly to the request.<br />
Also, if you use an error node to return errors, always use it.</p>
<p>For instance, <a href="http://technorati.com/developers/api/bloginfo.html" rel="nofollow">http://technorati.com/developers/api/bloginfo.html</a> returns an empty response with URL when the URL is not a blog, <a href="http://technorati.com/developers/api/blogposttags.html" rel="nofollow">http://technorati.com/developers/api/blogposttags.html</a> returns an error.</p>
<p>3. Return meaningful error messages</p>
<p>It&#8217;s always a good idea to return an error status along with a full explanation.</p>
<p>4. Provide a comprehensive documentation</p>
<p>Also make sure your documentation is up-to-date and reflects the real API interface.</p>
<p>5. Do not drop old API URIs/methods, use a coherent error message or status code (410)</p>
<p>6. Include schema/api version in the response</p>
<p>In this way developer can create intelligent libraries that validates and supports multiple API versions.</p>
<p>7. Don&#8217;t change node order or container</p>
<p>For instance, Technorati sometimes puts inboundblogs/inboundlinks within weblog tag (TestGetInfoSuccess.xml) and sometimes outside (BlogInfo, Cosmos).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert J Stinklestein</title>
		<link>http://wonderfullyflawed.com/2009/07/02/get-your-api-right/#comment-689</link>
		<dc:creator>Robert J Stinklestein</dc:creator>
		<pubDate>Thu, 16 Jul 2009 15:27:42 +0000</pubDate>
		<guid isPermaLink="false">http://wonderfullyflawed.com/?p=257#comment-689</guid>
		<description>Sir,

I have attempted to access your periodical at great expense over the telegraphy wire STOP. 

Please endeavor to use fewer characters in the future STOP</description>
		<content:encoded><![CDATA[<p>Sir,</p>
<p>I have attempted to access your periodical at great expense over the telegraphy wire STOP. </p>
<p>Please endeavor to use fewer characters in the future STOP</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wonderfullyflawed</title>
		<link>http://wonderfullyflawed.com/2009/07/02/get-your-api-right/#comment-688</link>
		<dc:creator>wonderfullyflawed</dc:creator>
		<pubDate>Thu, 16 Jul 2009 15:10:26 +0000</pubDate>
		<guid isPermaLink="false">http://wonderfullyflawed.com/?p=257#comment-688</guid>
		<description>@commenter
Oh, that&#039;s very true!. 

However, this thread isn&#039;t an indication of it. 

I write about IA, standards based web stuff, and development in a *NIX environment. My Win/IE readership (especially IE6 where the contrast is a particular issue) is 2.2%. I have more readers who speak English as a foreign language that people who use IE. And, yet, none of them come in saying &quot;What is the point of publishing an unreadable opinion piece? Roman characters, English grammar. Why make it difficult? Ever heard of Chinese?</description>
		<content:encoded><![CDATA[<p>@commenter<br />
Oh, that&#8217;s very true!. </p>
<p>However, this thread isn&#8217;t an indication of it. </p>
<p>I write about IA, standards based web stuff, and development in a *NIX environment. My Win/IE readership (especially IE6 where the contrast is a particular issue) is 2.2%. I have more readers who speak English as a foreign language that people who use IE. And, yet, none of them come in saying &#8220;What is the point of publishing an unreadable opinion piece? Roman characters, English grammar. Why make it difficult? Ever heard of Chinese?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: commenter</title>
		<link>http://wonderfullyflawed.com/2009/07/02/get-your-api-right/#comment-687</link>
		<dc:creator>commenter</dc:creator>
		<pubDate>Thu, 16 Jul 2009 10:03:48 +0000</pubDate>
		<guid isPermaLink="false">http://wonderfullyflawed.com/?p=257#comment-687</guid>
		<description>&quot;I suspect it’s only an issue on IE/Windows. In that case, you’re specifically not my target audience.&quot;

Arrogant dick.</description>
		<content:encoded><![CDATA[<p>&#8220;I suspect it’s only an issue on IE/Windows. In that case, you’re specifically not my target audience.&#8221;</p>
<p>Arrogant dick.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John O'Shea</title>
		<link>http://wonderfullyflawed.com/2009/07/02/get-your-api-right/#comment-679</link>
		<dc:creator>John O'Shea</dc:creator>
		<pubDate>Thu, 09 Jul 2009 21:04:32 +0000</pubDate>
		<guid isPermaLink="false">http://wonderfullyflawed.com/?p=257#comment-679</guid>
		<description>@Joel Potishchman we were playing with your approach but we&#039;ve discovered that while our &quot;cripplied&quot; client (a flash player based ria) is capable of setting a custom HTTP Request header, flash does not appear to provide an API for getting HTTP response headers (specifically one like the X-True-Status-Code header in your example).

Are we missing something?</description>
		<content:encoded><![CDATA[<p>@Joel Potishchman we were playing with your approach but we&#8217;ve discovered that while our &#8220;cripplied&#8221; client (a flash player based ria) is capable of setting a custom HTTP Request header, flash does not appear to provide an API for getting HTTP response headers (specifically one like the X-True-Status-Code header in your example).</p>
<p>Are we missing something?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wonderfullyflawed</title>
		<link>http://wonderfullyflawed.com/2009/07/02/get-your-api-right/#comment-677</link>
		<dc:creator>wonderfullyflawed</dc:creator>
		<pubDate>Thu, 09 Jul 2009 15:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://wonderfullyflawed.com/?p=257#comment-677</guid>
		<description>@Joel Potishchman: true, that&#039;s a fine use of &lt;code&gt;POST&lt;/code&gt; as long as you follow the spec and send back &quot;either 200 (OK) or 204 (No Content) ... depending on whether or not the response includes an entity that describes the result.&quot;</description>
		<content:encoded><![CDATA[<p>@Joel Potishchman: true, that&#8217;s a fine use of <code>POST</code> as long as you follow the spec and send back &#8220;either 200 (OK) or 204 (No Content) &#8230; depending on whether or not the response includes an entity that describes the result.&#8221;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
