Ask HN: What is your go-to example for a good REST API?
401 pointsI tend to always look to api.github.com when I need a little inspiration.
Anyone have some good examples of a particularly well laid out API?
Anyone have some good examples of a particularly well laid out API?
Comments (182) 67 threads
Earlier commentshttps://github.com/jfinkels/flask-restless
Instead of /persons/23/edit, maybe POST /person/23
Instead of /persons/77/delete, maybe DELETE /person/23
Also, verbs are not RESTful. Verbs imply an RPC interface.
REST (noun):RPC (verb):
The REST paper has good ideas, and people are picking and choosing what they want. There is no REST specification that makes HATEOAS mandatory. Maybe Roy Fielding should have written one on top of HTTP to make it clear what it is about instead of writing an dissertation.
How do you represent a link semantically? 100 businesses will have 100 different answers. That's why, by the way, HTML was so ingenious. HTML tags ARE semantic. If Roy came with a core set of tags describing things then people would know how to write basic HATEOAS APIs.
So don't blame the people, blame the absence of a clear specification(and no, the REST paper is not a spec, a spec is normative).
All this shouldn't matter as long as every IS documented. HATEOAS can't replace a good documentation. Today, for most developers REST is about urls, verbs and caching + a few other headers, nothing more.
[1] https://github.com/kevinswiber/siren [2] http://stateless.co/hal_specification.html
All comments shown.
Couldn't load more comments. Check your connection and try again.