Episode #547
JSON API in Rails – Part 1

So it’s Monday, and the top ticket on the board is to add a simple RESTfu JSON-based API to your application. Using Ruby on Rails, this is simple enough to implement, and you know you can bang it out by the end of the day.

But it’s one thing to add a basic endpoint to spew some JSON data at a client. It’s another to gracefully grow an API that’s consistent, predictable, well-documented, has sensible error reporting, and supports more complex queries from the client side. Fortunately, the JSON API standard has emerged to help take some of the guesswork out of how to structure a robust and extensible HTTP API. In today’s episode, guest chef Youssef Chaker joins us to discuss some of the risks in adding a quick, ad-hoc JSON endpoint. In part 2 of this series, he’ll return and show us how to use JSON-API gems to quickly and painlessly add an industrial-grade RESTful interface to our applications. Enjoy!

Members only

Log in below or get 48-hour access for $5.

Need more time? See all available plans.