REST stands for Representational State Transfer. It is a software architectural style that defines a set of constraints or rules that you should adhere to when you are creating your APIs.

What about RESTful APIs? Well, when the APIs are conformed to these constraints, they are called RESTful APIs.

REST sets up a standard that makes it easier to use those APIs and anyone (ex: developer) familiar with these standards can quickly start using these APIs.

Let’s go over some of these architectural constraints:

If you are interested, you can read more about these constraints here

With REST most commonly used means of communication is via HTTP. Let’s take a look at what the HTTP Request looks like -

  • Base URI: this is where you are making the request from. ex:
  • HTTP Methods: what operation you are performing (GET, POST etc..)
  • Headers: additional information passed to the client and server (ex: authentication, content-type etc..)
  • Body: optional data/body to provide with the request

We covered HTTP methods briefly above, let’s go over them a little bit more. REST HTTP Methods follow CRUD operations and it maps the following way -

  • POST (Create) — creates a new resource (adds a new entry in the database)
  • GET (Read) — most commonly used to fetch/retrieve data
  • PUT/PATCH (Update) — used to update a resource (edits an existing entry in the database)
  • DELETE (Delete) — delete a resource from the server (delete the entry from the database)

Check out the video below to see a real API example to better understand the above topics

Follow @automationbro on Twitter for latest updates
Subscribe to my YouTube channel to see more content like this

SDET Architect | YouTuber | Tech Blogger | Love to explore new tools and technologies. Check out my YouTube channel —

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store