<story><title>How to Design Better APIs</title><url>https://r.bluethl.net/how-to-design-better-apis</url></story><parent_chain><item><author>kumarvvr</author><text>Sometimes, I feel that we ought to have a simple protocol, on top of HTTP, to simply do remote procedure calls and throw out all this HTTP verbs crap. Every request is a http POST, with or without any body and the data transfer is in binary. So that objects can be passed back and forth between client and server.&lt;p&gt;Sure, there is gRPC, but it requires another API specification (the proto files).&lt;p&gt;There I said it. HTTP Verbs constrained REST APIS are the worst thing ever. I hate them.&lt;p&gt;They introduce un-necessary complexity, un-necessary granularity and they almost always stray away from the &amp;quot;REST principles&amp;quot;. To hell with &amp;quot;Hypermedia&amp;quot; stuff.&lt;p&gt;I find it such a joy to program in server rendered pages. No cognitive overhead of thinking in &amp;quot;REST&amp;quot;.&lt;p&gt;But, of course, all this is only where the client and server are developed by the same person &amp;#x2F; company.&lt;p&gt;For publishing data and creating API for third party use, we have no serious, better alternative to REST.</text></item></parent_chain><comment><author>tobyjsullivan</author><text>As someone who has spent a decade working with APIs, I 100% agree. The use cases that are a good fit for “RESTful” APIs pale in comparison to those that would benefit from RPC.&lt;p&gt;What is the point of having your client translate an action to some operation on a document (read or write), only to then have your server try to infer what action was intended by said document operation.&lt;p&gt;It pains me that this article  doesn’t mention any of the trade offs of each suggestion (POST vs PUT vs PATCH and expandable objects, especially) or of using REST APIs generally.</text></comment>
<story><title>How to Design Better APIs</title><url>https://r.bluethl.net/how-to-design-better-apis</url></story><parent_chain><item><author>kumarvvr</author><text>Sometimes, I feel that we ought to have a simple protocol, on top of HTTP, to simply do remote procedure calls and throw out all this HTTP verbs crap. Every request is a http POST, with or without any body and the data transfer is in binary. So that objects can be passed back and forth between client and server.&lt;p&gt;Sure, there is gRPC, but it requires another API specification (the proto files).&lt;p&gt;There I said it. HTTP Verbs constrained REST APIS are the worst thing ever. I hate them.&lt;p&gt;They introduce un-necessary complexity, un-necessary granularity and they almost always stray away from the &amp;quot;REST principles&amp;quot;. To hell with &amp;quot;Hypermedia&amp;quot; stuff.&lt;p&gt;I find it such a joy to program in server rendered pages. No cognitive overhead of thinking in &amp;quot;REST&amp;quot;.&lt;p&gt;But, of course, all this is only where the client and server are developed by the same person &amp;#x2F; company.&lt;p&gt;For publishing data and creating API for third party use, we have no serious, better alternative to REST.</text></item></parent_chain><comment><author>spikej</author><text>I don&amp;#x27;t think I&amp;#x27;ve ever come across any third party actually implementing HATEOAS (&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;en.wikipedia.org&amp;#x2F;wiki&amp;#x2F;HATEOAS&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;en.wikipedia.org&amp;#x2F;wiki&amp;#x2F;HATEOAS&lt;/a&gt;)</text></comment>