...

/

What and Who Our API Is for

What and Who Our API Is for

Learn about utilizing Rails for REST APIs, highlighting the framework’s ease in crafting JSON endpoints for programmatic communication between systems.

We'll cover the following...

Overview

Rails is a great framework for making REST APIs, which are web services intended to be consumed not by a browser, but by another programmer. Even if our app is not explicitly an API designed for others to consume, we might end up needing to expose endpoints for our front end or for another app at our company to consume.

The great thing about APIs in Rails is that they can be built pretty much like regular Rails code. The only difference is that our APIs render JSON (usually) instead of an HTML template. Still, developers do tend to over-complicate things when an API is involved and often miss opportunities to keep things sustainable by leveraging what Rails gives us.

That’s what this ...