August 24, 2004

Flickr REST Service not so RESTful

Lucas points out that the Flickr service's "REST" interface isn't very RESTful at all. It's such a shame, because using HTTP directly is so simple and there are plenty of examples and discussions. You know, it's okay to get a little help from your friends...


4 comments:

Stewart said...

Were does he point it out? We'd be interested in reading it :)

Lucas Gonze said...

http://gonze.com/weblog/index.cgi/2004/08/24#8-24-4

:)

Stewart said...

Ah, I see. I get the point, but it's a little pendantic - we could just call it an HTTP-based API, or "XML over HTTP" or some such. But since 'REST' is commonly used in this way, defending the narrow definition (no matter how correct it may be according to the original) is a losing battle. Or perhaps I'm just overly pragmatic. (But note all the argument on the referenced wiki page, or the stuff referenced from Paul Prescod's nice page of REST links @ http://prescod.net/rest/ - it's not like there is any clear consensus on The One True Meaning anyway.)

Mike said...

You shouldn't call it 'REST' if it doesn't follow the REST architectural style documented by Roy Fielding.

There's nothing wrong with having lots of URIs and such in an HTTP API. Putting a 'method' in the URI causes them to be single-action resources (only GET or only POST, never both). It has to do with the 'resource modeling' aspect of REST. The 'getPerms' and 'setPerms' is an example of this - you should be able to have a 'perms' thing and GET/PUT to it.

If it works for you, it works. But it isn't REST because of the lack of a 'uniform interface'.