What happens when you DELETE a resource?

Have you ever found yourself publishing an API, either an internal or a public one? Have your ever heard from the consumers of those same APIs back? Are they happy about the functionality of your APIs and their design? You already know, there is no perfect design, but API design has to be taken very seriously. Why? Because evolving and changing APIS is hard and time consuming. Imagine you are on a team in a company, that has set off to design a company-wide API guideline and a blueprint....

October 29, 2016 · 10 min · Ilija

Sprinkle some HATEOAS on your Rails APIs

REST as a concept was introduced by Roy Fielding in his doctoral thesis, named Architectural Styles and the Design of Network-based Software Architectures. 16 years later, REST as an architecture is the most widely accepted way to design and build APIs. I am sure we have all heard about it, and most of us think we are building actual RESTful APIs. But, are we? Let’s remind ourselves what REST is and then continue on something else that supplements REST, called HATEOAS....

June 26, 2016 · 21 min · Ilija

How Rails handles status codes

Recently, I have been building an API as part of my day job. Rails is a great framework to build APIs in, and it has been a joy so far. When building the responses of the API, it’s paramount to understand what HTTP statuses you should utilize, which will in return help the consumers by providing more meaningful responses. Sure, you could always have a status property in the response JSON, which will be a human-readable status code....

May 27, 2016 · 9 min · Ilija