<?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/"
		>
<channel>
	<title>Comments on: The Design of the Twitter REST API</title>
	<atom:link href="http://www.dimuthu.org/blog/2008/09/29/the-design-of-the-twitter-rest-api/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dimuthu.org/blog/2008/09/29/the-design-of-the-twitter-rest-api/</link>
	<description>Waiting for your comments</description>
	<lastBuildDate>Mon, 15 Mar 2010 02:10:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: dimuthu</title>
		<link>http://www.dimuthu.org/blog/2008/09/29/the-design-of-the-twitter-rest-api/comment-page-1/#comment-11789</link>
		<dc:creator>dimuthu</dc:creator>
		<pubDate>Sat, 22 Aug 2009 17:24:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.dimuthu.org/?p=408#comment-11789</guid>
		<description>Hi Khaled,
I agree most of the time filter params can be embedded within a url. But I think in a complex set of filters we better adapt query params. Let say we say we designed a url like this.
books/author/{author}/published/{published-year}/publisher/{publisher} -[1]
Instead I would have prefered,
books?author={author}&amp;published={published-year}&amp;publisher={publisher} -[2]
Although you can say the url[1] mapped to a particular set of resources, when you drop 1 or 2 filter (author or publisher) it become a completely different url, but with url[2], it is not strange to drop some filters.

This is just my thoughts. Probably you may not see any wrong there.

And as you said, a client can use Accpet header to request server the response format/media type. I also haven&#039;t see that is used much, probably because not much REST frameworks are not supporting that.
Thanks for sharing your thoughts.

Thanks
Dimuthu</description>
		<content:encoded><![CDATA[<p>Hi Khaled,<br />
I agree most of the time filter params can be embedded within a url. But I think in a complex set of filters we better adapt query params. Let say we say we designed a url like this.<br />
books/author/{author}/published/{published-year}/publisher/{publisher} -[1]<br />
Instead I would have prefered,<br />
books?author={author}&#038;published={published-year}&#038;publisher={publisher} -[2]<br />
Although you can say the url[1] mapped to a particular set of resources, when you drop 1 or 2 filter (author or publisher) it become a completely different url, but with url[2], it is not strange to drop some filters.</p>
<p>This is just my thoughts. Probably you may not see any wrong there.</p>
<p>And as you said, a client can use Accpet header to request server the response format/media type. I also haven&#8217;t see that is used much, probably because not much REST frameworks are not supporting that.<br />
Thanks for sharing your thoughts.</p>
<p>Thanks<br />
Dimuthu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Khaled Hussein</title>
		<link>http://www.dimuthu.org/blog/2008/09/29/the-design-of-the-twitter-rest-api/comment-page-1/#comment-11787</link>
		<dc:creator>Khaled Hussein</dc:creator>
		<pubDate>Sat, 22 Aug 2009 16:20:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.dimuthu.org/?p=408#comment-11787</guid>
		<description>Hi dimuthu,
Very intere
I don&#039;t see anything wrong with putting the filter params in the URL. Another approach is set your filter params in a custom header of that request. 

Do you guys think that setting the response format (eg. url/status.xml) in the URI is the right thing to do (RESTful)? I had a blog post on why you shouldn&#039;t do that. And I am really interested to know your thoughts about it. I am starting to see it in more and more APIs -- and I am not sure why architects choose this design decision. 

Here is the post URI. http://www.khussein.com/how-to-design-a-restful-api/</description>
		<content:encoded><![CDATA[<p>Hi dimuthu,<br />
Very intere<br />
I don&#8217;t see anything wrong with putting the filter params in the URL. Another approach is set your filter params in a custom header of that request. </p>
<p>Do you guys think that setting the response format (eg. url/status.xml) in the URI is the right thing to do (RESTful)? I had a blog post on why you shouldn&#8217;t do that. And I am really interested to know your thoughts about it. I am starting to see it in more and more APIs &#8212; and I am not sure why architects choose this design decision. </p>
<p>Here is the post URI. <a href="http://www.khussein.com/how-to-design-a-restful-api/" rel="nofollow">http://www.khussein.com/how-to-design-a-restful-api/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dimuthu</title>
		<link>http://www.dimuthu.org/blog/2008/09/29/the-design-of-the-twitter-rest-api/comment-page-1/#comment-4281</link>
		<dc:creator>dimuthu</dc:creator>
		<pubDate>Thu, 05 Mar 2009 03:02:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.dimuthu.org/?p=408#comment-4281</guid>
		<description>Hi Jaka Janncer,
I don&#039;t think we can put all the restrictions in filter inside a URL. I would prefer to use

/users/{user_id}/statuses.xml?filters[born][from]=1970&amp;filters[born][to]=1980

I think the idea is to assign a URL to a resource and do CRUD operation around that. And when we do GET, we may need to do some filtering with query parameters of the url, (which we don&#039;t use for post or put obviously)

Well, I have read it is ok to put query params in the RESTful API.(But I&#039;m not sure whether it is ok to the philosophy :). At least we have to use it for filtering as you told.

Among the available public APIs, I also think twitter is far more RESTful. There are frameworks that help to write RESTful web services, which should be used in lot of places (but not sure the public availability). At least there are some theoretical scenarios available, &lt;a href=&quot;http://www.infoq.com/articles/webber-rest-workflow&quot; rel=&quot;nofollow&quot;&gt;http://www.infoq.com/articles/webber-rest-workflow&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Hi Jaka Janncer,<br />
I don&#8217;t think we can put all the restrictions in filter inside a URL. I would prefer to use</p>
<p>/users/{user_id}/statuses.xml?filters[born][from]=1970&#038;filters[born][to]=1980</p>
<p>I think the idea is to assign a URL to a resource and do CRUD operation around that. And when we do GET, we may need to do some filtering with query parameters of the url, (which we don&#8217;t use for post or put obviously)</p>
<p>Well, I have read it is ok to put query params in the RESTful API.(But I&#8217;m not sure whether it is ok to the philosophy <img src='http://www.dimuthu.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . At least we have to use it for filtering as you told.</p>
<p>Among the available public APIs, I also think twitter is far more RESTful. There are frameworks that help to write RESTful web services, which should be used in lot of places (but not sure the public availability). At least there are some theoretical scenarios available, <a href="http://www.infoq.com/articles/webber-rest-workflow" rel="nofollow">http://www.infoq.com/articles/webber-rest-workflow</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JakaJancar</title>
		<link>http://www.dimuthu.org/blog/2008/09/29/the-design-of-the-twitter-rest-api/comment-page-1/#comment-4268</link>
		<dc:creator>JakaJancar</dc:creator>
		<pubDate>Wed, 04 Mar 2009 19:31:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.dimuthu.org/?p=408#comment-4268</guid>
		<description>A bit late and off-topic, but since you&#039;re &quot;waiting for our comments&quot;, what the heck :)

How would you RESTfully design searching (filtering), ordering and pagination?

Sometimes filtering can be done nicely via &quot;sub-resources&quot;, like /users/{user_id}/statuses.xml in the Twitter API, but this won&#039;t work for multiple filters or filters with ranges, etc.

Would you use some ugliness like
/statuses.xml?filters[user]={user_id}&amp;filters[born][from]=1970&amp;filters[born][to]=1980
?

When (if at all), philosophically, do you think are query params permissible in RESTful APIs?


BTW: Are there any good APIs that actually _ARE_ RESTful out there to use for reference? Seems Twitter only comes close, Flickr and Facebook think REST is XML-RPC, etc.</description>
		<content:encoded><![CDATA[<p>A bit late and off-topic, but since you&#8217;re &#8220;waiting for our comments&#8221;, what the heck <img src='http://www.dimuthu.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>How would you RESTfully design searching (filtering), ordering and pagination?</p>
<p>Sometimes filtering can be done nicely via &#8220;sub-resources&#8221;, like /users/{user_id}/statuses.xml in the Twitter API, but this won&#8217;t work for multiple filters or filters with ranges, etc.</p>
<p>Would you use some ugliness like<br />
/statuses.xml?filters[user]={user_id}&amp;filters[born][from]=1970&amp;filters[born][to]=1980<br />
?</p>
<p>When (if at all), philosophically, do you think are query params permissible in RESTful APIs?</p>
<p>BTW: Are there any good APIs that actually _ARE_ RESTful out there to use for reference? Seems Twitter only comes close, Flickr and Facebook think REST is XML-RPC, etc.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
