Top all-time · #2617
Vinay Sahni
Personal blog · vinaysahni.com · on HN as veesahniprogrammingwebbusiness
Vinay Sahni's personal blog at vinaysahni.com covers programming, web and business. Since 2013, 29 different Hacker News readers have linked it 44 times, most often “Best Practices for Designing a Pragmatic RESTful API”. No feed was found, so read it on the site itself.
Too few sampled comments (16) to say how often HN recommends it.?
Why HN links it
HN readers link his REST API design guide, 'Best Practices for a Pragmatic RESTful API', as a reference for designing web APIs, including status codes, responses and JSON conventions.
Summarised by Claude from a sample of 16 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Most-linked posts?
- Best Practices for Designing a Pragmatic RESTful API16 people · 19 mentions · first linked 2013-05-29
- Best Practices for Designing a Pragmatic RESTful API5 people · 7 mentions · first linked 2018-10-04
- Best Practices for Building a Microservice Architecture5 people · 5 mentions · first linked 2016-08-17
- Designing a Pragmatic RESTful API2 people · 2 mentions · first linked 2013-06-04
What Hacker News says?
I wrote about API design (with a similar rejection of HATEOAS): http://www.vinaysahni.com/best-practices-for-a-pragmatic-res... In short: humans can follow links, even as a website goes through significant changes. Code can follow links, but can't make clear independent decisions when significant changes happen to the API. [Updated for clarity]
Comment linking /best-practices-for-a-pragmatic-restful-api
on “API Design Guide”Submitted Designing a Pragmatic RESTful API as a story · 311 points
HN discussion1) Does all this depend on use case? Yes, heavily. Best practices are needed, but final design choices are tailored. 2) I don't like dup query params, it's not well defined: http://stackoverflow.com/questions/1746507/authoritative-pos... For returning multiple types at once there are a few common strategies. For related types some APIs offer an "include" or "embed" approach like this: http://www.vinaysahni.com/best-…
Comment linking /best-practices-for-a-pragmatic-restful-api
on “Academic Torrents: A distributed system for sharing enormous datasets”Submitted Best Practices for Designing a Pragmatic RESTful API as a story · 237 points
HN discussionhttps://www.vinaysahni.com/best-practices-for-a-pragmatic-re... Helped me get started with API design in my early career. Learning from other existing APIs helps too. such as stripe, github, shopify. Any others? Something that We do at my current job: * set a standard and stick with it. tweak it if needed. we even have naming standard on some of the json key. for example, use XXX_count for counting. when it doesn't…
Comment linking /best-practices-for-a-pragmatic-restful-api
on “How to Design Better APIs”Submitted Best Practices for Designing a Pragmatic RESTful API as a story · 176 points
HN discussionSlightly off-topic, but I found this article useful when implementing a REST-API: http://www.vinaysahni.com/best-practices-for-a-pragmatic-res... It has a section about status-codes: http://www.vinaysahni.com/best-practices-for-a-pragmatic-res...
Comment linking /best-practices-for-a-pragmatic-restful-api
on “Choosing an HTTP Status Code”Submitted Writing Effective Welcome Emails as a story · 132 points
HN discussionI collated a list of best practices here: http://www.vinaysahni.com/best-practices-for-a-pragmatic-res...
Comment linking /best-practices-for-a-pragmatic-restful-api
on “Ask HN: What is your go-to example for a good REST API?”Submitted Best Practices for Building a Microservice Architecture as a story · 20 points
HN discussionAside from Vinay's guide that has already been mentioned - http://www.vinaysahni.com/best-practices-for-a-pragmatic-res... There is also this Medium post: https://bradfults.com/the-best-api-documentation-b9e46400379...
Comment linking /best-practices-for-a-pragmatic-restful-api
on “Ask HN: What are good reads for designing APIs?”Submitted A comprehensive guide for pragmatic RESTful API design as a story · 10 points
HN discussionhttp://www.vinaysahni.com/best-practices-for-a-pragmatic-res...
Comment linking /best-practices-for-a-pragmatic-restful-api
on “Ask HN: What are good reads for designing APIs?”Submitted What to Do When Google Decides Your SaaS Is Dangerous as a story · 4 points
HN discussionI wrote a popular blog post on this one: https://www.vinaysahni.com/best-practices-for-a-pragmatic-re...
Comment linking /best-practices-for-a-pragmatic-restful-api
on “Ask HN: Suggestions for books about API design?”Submitted Best Practices for Building a Microservice Architecture as a story · 4 points
HN discussionI've written a comprehensive one on this topic a few years ago: https://www.vinaysahni.com/best-practices-for-a-pragmatic-re...
Comment linking /best-practices-for-a-pragmatic-restful-api
on “Best practices for REST API design (2020)”Submitted Best Practices for Building a Microservice Architecture as a story · 3 points
HN discussionThis is a much (much :-)) better post about "REST"/"HTTP" API best practices: http://www.vinaysahni.com/best-practices-for-a-pragmatic-res...
Comment linking /best-practices-for-a-pragmatic-restful-api
on “Some REST best practices”Submitted Best Practices for Designing a Pragmatic RESTful API as a story · 3 points
HN discussionHere are a couple more lists of Best Practices for REST APIs. http://blog.mwaysolutions.com/2014/06/05/10-best-practices-f... http://www.vinaysahni.com/best-practices-for-a-pragmatic-res... The Github team does a pretty good job of incorporating modern best practices as well, so I often use their API as a reference: https://developer.github.com/v3/
Comment linking /best-practices-for-a-pragmatic-restful-api
on “Some REST best practices”Submitted Best Practices for Building a Microservice Architecture as a story · 3 points
HN discussionWhen we started building Enchant [0], we used some tech that we understood well and some tech that was new and shiny. Over the years, most of the new and shiny choices eventually caused more pain than we had ever anticipated. We ended up either ripping them out or working around the problems they introduced. But I think "choose boring technology" is not a great guiding light. I've written previously about how to pic…
Comment linking /how-to-choose-the-right-technology
on “Choose Boring Technology”Submitted Best Practices for Designing a Pragmatic RESTful API as a story · 3 points
HN discussionThe key here is to take a pragmatic approach. If the consumer will likely just need id's, then the first approach is good If the consumer will need data in addition to id's, then the second approach is good If both of the above options are used heavily, then implement the second approach and implement field filtering[1] on top [1] - http://www.vinaysahni.com/best-practices-for-a-pragmatic-res...
Comment linking /best-practices-for-a-pragmatic-restful-api
on “Best Practices for Designing a Pragmatic RESTful API”Submitted Best Practices for Building a Microservice Architecture as a story · 2 points
HN discussionAnother aspect of this is Google's inflationary tactics that continue to rack up rates. I had written a post on this: http://www.vinaysahni.com/how-google-inflates-adwords-bids Their inflationary game has still not ended. This week I got a coupon in the mail for $200 AdWords credit if I spend $50.
Comment linking /how-google-inflates-adwords-bids
on “The declining profitability of Google Adwords”Submitted Best Practices for Building a Microservice Architecture as a story · 2 points
HN discussionUse REST for reading, but RPC-style calls for writing. Benefits: 1. Every write-call is a transaction 2. You can have complex filtering and sorting in the read/access side of your API without having to worrying about the update-side of things. 3. You can evolve the read-API, even change semantics and return different objects and again, not worry about transactions. 4. You are not limited to the HTTP-standard. Here a…
Comment linking /best-practices-for-a-pragmatic-restful-api
on “How should we build the APIs of tomorrow?”Submitted Best Practices for Designing a Pragmatic RESTful API as a story · 2 points
HN discussion