Lorna Mitchell: Five Clues That Your API isn’t RESTful

Lorna Mitchell: Five Clues That Your API isn’t RESTful

Lorna Mitchell has posted a quick checklist of things you can ask about your API to see if it’s RESTful or not (five of them):

I get a lot of emails asking me to get involved with API projects, and that means I see a lot of both implemented and planned “RESTful” APIs. [...] A service of some other description may work better for other scenarios or skill sets, and non-RESTful services can be very, very useful. If you tell me that your service is RESTful, then I expect it to be. If you’re not sure, look out for these clues:

  • It has a single endpoint
  • All requests are POSTs
  • Response metadata is in the body, not header
  • There are verbs in the URL
  • The URL includes method names

She suggests, though, that “being RESTful” isn’t a requirement for “being useful” when it comes to APIs.

Source: http://www.phpdeveloper.org/news/19078

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Posted Styczeń 24th, 2013 in WEB and PHP Development.

Leave a response: