What is REST API and how to use POSTMAN to call API? For beginners 😉

Shweta Valunj
3 min readSep 22, 2020

If you are a student or just beginning to understand what API is then you are at right place.

Points we will cover:

  1. What does API mean? Where is it used?
  2. What are REST APIs?
  3. Make a call to a simple REST API using POSTMAN.

What does API mean? Where is it used?

Everyone will tell you what API stands for “Application Programming Interface” but it is very difficult for a beginner to understand all the terms.

API is a way through which one can exchange data. It is widely used everywhere whenever we deal with data.

Whenever you go to a website for example instagram, the data you see here is fetched with help of APIs. The profile details like name, description, number of followers etc are stored in a database. When someone sees your profile this data is fetched with the help of API.

What are REST APIS?

REST (Representational State Transfer) is a standard or set of rules used by the developers when they write an API. It decides how the API will look like.

When you visit a website it loads data for you which is present somewhere else and not on your phone. So how do you get this data? REST API is one way of getting this data(which is also called as “resource” in techie language 😛).

Let’s try to make a GET call in next section using POSTMAN.

Make a call to simple API using POSTMAN.

POSTMAN is a tool used by developers to work with APIS. Using this tool you can get, create, delete or update the data.

In below example we will request to view a random dogs breed.

You can download POSTMAN from this link https://www.postman.com/downloads/. After which you will see a screen like this 👇🏼

Start Screen
  1. Click on the “Create Request” linked marked above.
  2. Provide the data like the way given in below screenshot. URL is https://dog.ceo/api/breeds/image/random

As you can see the first half of the screen is the request of type GET with url value https://dog.ceo/api/breeds/image/random.

When you hit SEND button, the second half of the screen provides the response. Response has 200 OK and some data i.e message and status. Attribute message has a link of a picture of a dog https://images.dog.ceo/breeds/schnauzer-miniature/n02097047_6744.jpg

We successfully got a response for the API that we had called.

Conclusion

We can view or update or add any data to our application with the help of an API.

Like GET method we can have other options like POST, DELETE, PUT etc. which helps us to add some data or delete it or just view it like above example to see image of a dog.

You can create an API on your own using any technology and access the data with help of an API.

I hope with this small example you got a general idea about API and how to make a call to simple GET API.

--

--