Posts

Showing posts with the label rest

What REST is NOT, Updated

In a surprising update to my post earlier this week about what REST is NOT , I just spoke with Rooly Eliezerov , the President and co-founder of Gigya. We had a nice conversation about the goals of Gigya, primarily that they want to aggregate these other social web services and their design philosophy is to mimic Facebook and Twitter's API. I expressed that using GET to change a resource isn't a REST principle either company's API breaks. He was surprised to hear it and said he'd follow-up with his team to validate that and get back to me. Whatever the outcome, I really appreciate that a company with their goals and reach is interested in what little ol' me has to say. It speaks volumes to their passion and customer support.

What REST is NOT

Update : I spoke with the president of Gigya . Having only familiarized myself with REST a few months ago, I still struggle to explain to colleagues what REST is. My best one sentence summary so far is that it's "using HTTP as it was designed". Not a perfect or even complete summary, but I think it covers the highlights. This week I've been reviewing Gigya's REST APIs for an upcoming project at work. And I've found it to be a shining example of designing an API incorrectly and calling it RESTful. It solidified a couple of REST anti-patterns for me and I wanted to capture them: REST is not RPC, though RPC can be done RESTfully. GET is not for state changes. If you're operation has side effects, don't use GET. The response body is not the only way to send the client information. Don't duplicate information in the HTTP headers in the response body. Authentication is not part of your resource. Don't create a query parameter to do authen...