4 ms·
Not in the eyes of its creator https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hyp
by peterhunt 4y ago
Not in the eyes of its creator https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypert...
- LudwigNagasena 4y agoIs there a single example of API that fits that definition of REST though?
- empthought 4y agoHATEOAS is the search term you want to use. “Hypermedia as the engine of application state.” PayPal and GitHub APIs tend to work this way. They return a pile of hyperlinks.
- LudwigNagasena 4y agoIf by "tend to work that way" you mean that they satisfy around 20% of the requirements in the post by Roy T. Fielding as opposed to other services that satisfy only 10%...
- empthought 4y agoI don't think you are familiar with the GitHub REST API; none of Fielding's points apply to it.
- LudwigNagasena 4y agoI honestly don’t know how someone can design a truly HATEOAS API without breaking everyone’s expectations and making it a chore for people to deal with it. If stuffing a bunch of links into your JSON response is what truly transforms your RPC into REST (I don’t see what else makes GitHub API so different from other APIs), then I don’t even know what’s the point of that. And surely it is only superficially similar to the non-API REST, ie how simple websites usually work.
- progval 4y agoHTTP+HTML+CSS (and Javascript) is the REST API used to communicate between clients (browsers) and servers. It's not a coincidence, it was the point of the thesis defining REST to formalize and improve the Web. See: https://www.ics.uci.edu/~fielding/pubs/dissertation/introduction.htm https://www.ics.uci.edu/~fielding/pubs/dissertation/introduc... In terms of what we think of as an API today, my favorite is SWORD: https://sword.cottagelabs.com https://sword.cottagelabs.com In particular, it does not define any URL scheme, client applications are expected to read links from the XML (for v1 and v2) or JSON (for v3) body.