API on Rails 5
Last updated on 2019-02-11
About the Book
Learn best practice to build an API using Ruby on Rails 5. The intention with this book it’s not only to teach you how to build an API with Rails. The purpose is also to teach you how to build scalable and maintainable API with Rails which means improve your current Rails knowledge. In this book you will learn to:
- Build JSON responses
- Use Git for version controlling
- Testing your endpoints
- Optimize and cache the API
This book is based on "APIs on Rails: Building REST APIs with Rails". It was initially published in 2014 by Abraham Kuri . Since the original work was not maintained, I wanted to update this excellent work. All the source code of this book is available in Asciidoctor format on Github. So don’t hesitate to fork the project if you want to improve it or fix a mistake that I didn’t notice.
Reader Testimonials

Fabrizio Bertoglio
Amazing
I have read and build an API RESTful rails app based on this book, the book was amazing. I was able to improve my programming skills and style, learn methodologies I would not use before, write better DRY code, ... I really advise this training to everyone who want to work as backend developer or wants to improve his rails and ruby skills

John S
Great Guideline.
I've been getting a lot out of this book. Great guideline and resource to get things moving on how to structure an API.
Table of Contents
- Foreword
- Introduction
- The API
- Presenting the users
- Refactoring tests
- Authenticating users
- User products
- JSON with Active Model Serializers
- Placing Orders
- Improving orders
- Optimizations
The Leanpub 45-day 100% Happiness Guarantee
Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...