REST API stands for REpresentational State Transfer API(Application Programming Interface). In simple words, as an overview i say.. REST API = HTTP Verb + URL of the Website/Server you are accessing.
Hey, wait..i know you didn't understood. What's this HTTP Verb and all...but wait.... we'll understand everything in very simple, short and precise way.
Suppose, you are going to access a particular website... Let's take Amazon Prime...you want to purchase it's subscription...so what will happen?...umm...
It will expose it's end point to us💁🏻♂️. Now, for better understanding, let me clarity what end point is. In the sample website
That sales and payments stuff is the end point, means the particular point you got land on the website from there...
Now, as the conversation further proceeds, the user will go for payment.
But how will it proceed? Is it enough to access the data from Amazon Prime?
The answer is no. We need to have some option to communicate what we want to do...do we want to post something? Or we want to post something .
This will happen with the Help of HTTP Verbs.
HTTP Verbs are responsible to convey, what operation we want to perform on URL? It is of 4 types:
- GET
- PUT
- POST
- DELETE.
As we want to have information of the website, payment rates, we will use GET + URL.
When we are ready for payment, We will use PUT + URL.
So, concluding, this is what I said in start. This entire system of HTTP Verb + URL is REST API. In some other section, we will study the functioning of all 4 verbs respectively.