Re: How much REST should your Web API get?

Mike Schinkel <[email protected]> Thu, 2 May 2013 16:16:57 -0400
Newsgroups gmane.comp.web.services.rest
Message-ID <[email protected]>
On May 2, 2013, at 4:09 PM, Jan Algermissen <[email protected]> wrote:
>> OTOH if they all got together and created an "application/accounting" media type then I could see huge benefit.  (Hmm.  Maybe there is something there...)
> Well, that's the 'unified data model' discussion from the 90ies. Not gonna happen :-)

Really?  People in the IETF told TBL that naming having a "universal" resource locator was not going to happen...  

Never say never. :)

> But, consider this: REST leaves exactly one spot where you can put your semantics, that is the media type (and link rels for that matter, I keep lumping these together). The rest of REST (hah!) is uniform. Having variation take place in only one spot greatly simplifies integration (much easier to convert yourOrder.xml to myOrder.json than it is to have yourOrderAPI-client talk to myOrderAPI.)

Agreed.  A lot more needs to be made of this because currently AFAICT all the advocacy for people "Doing REST Wrong" is on HATEOUS/hypermedia. 

I also think the benefits of a standardized media type are much easier to grok by people who are not steeped in the lore of REST, and with a standardized media type the benefits of hypermedia can just piggyback their way in the door without needing explicit justification.

-Mike