what is rest api
/ / What is REST API
Web Technology

What is REST API

Share With Love

In this short article you are going to have a general idea about what is REST API and how REST API works

First, what API Is In General

So first let’s talk what API is in general it stands for Application Program Interface.

There many kinds of API but we are going to talks specific about web API it is a contract provided by one piece of software to another piece of software usually consist of structured request and then structured response.

A good example would be an API is basically a messenger or a waiter between running softwares

API example

Think like you are setting in a table in a restaurant and your one piece of software such as web application on the client side, and the kitchen is the server or the service that processes certain request and the waiter is acts like an API he is formatted to take certain order in specific way and bring back a certain meal that would be the data and response you requested.

What is REST API ?

So now that we know what API is so let’s talk about REST API.

It stands for Representational State Transfer it is an architecture style for designing network applications it works for relying on a stateless client-server communication protocol in almost all cases it is going to be HTTP

An example of server-side object would be a blog post in a database we can create the post with a post request, delete with delete request and what makes REST API so awesome is that it operates using just HTTP and usually some kinds of standard like  JSON can be used by programming languages because most of good languages can make HTTP request whether it is JavaScript, PHP, Python or Java  all these languages are perfectly capable of working with RESTfull or REST API which is essentially the same thing.

So now that we established what REST API is let’s look at specific methods and request that can be made to a server through HTTP.

  • GET: Retrieve data from a specified resource
  • POST: Submit data to be processed to a specified resource
  • PUT: Update a specified resource
  • DELETE: Delete specified resource
  • HEAD: Same as GET but does not return body
  • OPTION: Returns the supported HTTP methods
  • PATCH: Updated partial resources


Share With Love

Leave a Reply

Your email address will not be published. Required fields are marked *