DEV Community

Corbin Arnett
Corbin Arnett

Posted on

What is REST API?

With its wide use, REST is something that many developers have become accustomed to, and yet I could never give a great definition to what it actually is. Here is a simple breakdown of REST...

In 2000, Roy Fielding was frustrated with how URLs and their corresponding HTTP verbs (POST, GET, PUT, PATCH, DELETE) were being utilized differently across the web. Thus he came up with REST (REpresentational State Transfer) as a standard for how web applications should structure their URLs. This standardization of URL routes is used across the web today, and because of it, allows easy communication from one application to another. REST is described as an "architectural design pattern", very fancy I know😜. It is not a framework, but most web app frameworks use the REST design pattern in some form.

The table below is from the Rails documentation. Pay special attention to the Path column, it displays a simple example of the REST design pattern. Say we were building out an instagram clone app and we wanted to visit the specific page to upload a photo, following the table below we would go to https://www.myinstagramclone.com/photos/new.

Alt Text

https://guides.rubyonrails.org/routing.html

Following the REST format makes it easy for other applications and developers to know where specific data is located within your API.

Top comments (0)