Lurker News
I 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?

Comments (182) 67 threads

Earlier comments
AhtiK#
PostgREST is a standalone web server that turns your postgresql database directly into a RESTful API.

The REST API is designed intuitively, just as one would expect.
I've been using it a lot for prototyping and internal applications. Now with the help of native row level security from postgres, it would become also a good choice for production. Or just wrap it behind your gateway.
http://postgrest.com/ http://postgrest.com/api/reading/ http://postgrest.com/api/writing/

matmo2 replies#
What is OData? The website does a poor job of explaining it from a high level. The only discernible feature I see is adding "functions" to url's (ex: http://services.odata.org/V4/TripPinServiceRW/People("russel...)

I've seen "OData" mentioned here and there, but I've never understood the difference between OData and a classic REST API.

rzzzt#
OData is more or less SQL over HTTP. You get a rich toolbox for selection, projection and transformation of datasets exposed as an OData source (think EBay listings and SQL Server tables and reports), along with the remaining letters of CRUD.
ako#
Odata is à standardized rest use case for generaal purpose data access, so client tools can use it out of the box. Something like sql but over http. Some tools that provide odata support: tableau, tibco spotfire, linqpad, excel.

Excel is a nice example, you can have a sheet with data pulled in over odata from any app that supports odata.

wozer3 replies#
Related question: Does a REST API make sense for an internal interface? Or is the overhead prohibitive compared to a more specialized interface?

(By internal interface I mean: an interface that is used only by the team that created it)

blowski1 reply#
Maybe. It adds a whole layer of complexity, but it might be worth it. Depends on your team's structure and relevant experience, and on the details of the project.
rimantas#
I'd argue that it removes complexity, not adds it.
eecks#
I think it's more maintainable and easier to test
PeterisP#
It depends on the problem - if the particular interface is semantically suitable for REST, then there won't be any overhead and REST will just be a useful convention on how exactly you should represent it; and on the other hand if that particular interface needs are not suitable for REST then you probably should implement it with RPC, message queues or whatever other option better suits the problem instead of trying to mangle it into REST paradigm.

Load more comments