Getting Started with Postman and APIs: [Interactive Tutorial]— Hands-on Activity! 🛫
Welcome to the beginner’s guide to Postman! Postman is a
powerful tool for testing and developing APIs (Application Programming Interfaces). It allows you to send
HTTP requests to a
server and view the
responses, making it an essential tool for any developer working with
In this interactive tutorial, we’ll discuss the in-depth features of Postman and walk you through the basic steps of using it. We’ll also work with some examples to help you get started and get familiarised with APIs + Postman.
Disclaimer: In this article, we’ll cover the concepts of APIs and the installation of Postman. If you liked this article and wanted to continue your learning on Postman and its features, please feel free to Follow me!
So, what is Postman?
Simply put, it’s a tool that allows you to make
HTTP requests to a
server and receive the responses. This can be useful for testing APIs, as you can use Postman to send requests and view the responses to ensure that your API is working correctly. This is transform the fact that if your API is working correctly, then the back-end system is able to respond appropriately to the requests.
Before jumping right into the Postman, let’s take a step back and understand the basics!
What is an API?
If you’re new to concept of APIs, then you must remember the five important terms which will get repeated whenever you speak about APIs:
5. Status Code
Now, let’s take a look at some of the key concepts of Why we use APIs and Why it is so revolutionary?
To start with, it is a set of rules and protocols that specifies how two software systems should communicate with each other. In simple terms, it tells an user, how the Client and the Server should communicate to get the desired data from the database.
What is a Client?
It is just a
Browser or a
Machine from where the
Requests are initiated. If you take a look at the above image, you can see the
Requests are sent from the
Browser to the
Web Server which is on the other end.
What is a Server?
It is a
Machine which responds to your requests from
Client and provide valuable information in return which is called as
Response in the world of APIs. The
Server is obliged to share a
Response if your
Requests are qualified in the format/standard that it accepts. Once accepted, the Server will share a
Status Code which is called as
HTTP Response Code. This will tell you if the
Response is Successful or NOT. We can take a look at the details of the Status Code once we get into the concepts of Postman. For now, just consider it as a
three-digit code that we’ll get along with the
Response from the
That said, let’s assume a simple scenario, let’s say you’re in School/University and you wanted to take a leave tomorrow but you would need to request your Class Teacher for it. You’ll follow the below steps:
1. You’ll write a Leave Letter in a standard format using
2. In the
To section, you’ll specify that it is to your Class Teacher.
3. In the
Subject section, you’ll specify the brief reasoning of the letter.
4. In the
Body section, you’ll specify the details.
5. Now, you would need to
Request your Class Teacher to sign the Letter so you can take a leave which is an
Based on the above, let’s translate it in the terms of APIs so you can correlate.
You -> Client
Class Teacher -> Server
Subject -> Request Method [we’ll look into this later]
Body -> Request Body
Teacher’s Sign -> Response / Status Code.
I hope you must have understood something about the APIs now. APIs allow different softwares or applications to share data and functionality with each other very easily. For example, a weather app might use an API provided by a weather service to retrieve current weather data for a particular location. There are different types of APIs too and it is developed based on certain use cases.
Main Reason To Use APIs
Until now, we were discussing repeated statements on APIs allow different softwares or two different software systems to share data easily. If you take a deeper look at it, you’ll know why are APIs are revolutionary.
For example, I’m developing a
Python Application which requires your location from
Google Maps but the
Google Maps are created using the programming languages
Google Maps API. When I send a
Google Maps API Request from my
Python Application, automatically it will convert my Request to the
Ok, this is Good Enough knowledge about APIs to start with!! Let’s see more on this, when we cover Postman!!
To use Postman, you’ll first need to
install it on your computer. You can refer to this
Installation Documentation to know what to do post downloading the package. If you’re stuck somewhere while installation, please feel free to
comment so I can help you, if required.
Once you have it installed, you can open it up and start using it to send requests.
Here You Go, Dive Into Postman!
Using Postman is fairly simple. You’ll start by selecting the
Request you want to send. There are 4 majorly used methods:
You’ll then enter the URL of the Server you want to send the request to, and any additional parameters or data like
Body that you want to include in the
Request. Once you’ve entered this information, you can click the
Send button to send the
Request and view the
You must be wondering! Where is the Hands-on Activity 😃
Was it a Click-bait? 🤔
No, not at all! Ok, here we go!
🏃[Hands-on Activity] 🏃
Let’s start with a basic example today, we’ll just keep you from getting overhelmed by the new concepts.
#1 — Process GET Request using any Public API
Now, we are going to
Response i.e. information from an API which is Publicly available using the
URL provided by the
+ Postman Tool
+ Public URL / Endpoint — https://api.genderize.io?name=scott
I’m using the Public URL/Endpoint to
GET details of the gender based on the name. Please note, this is just an example. You can use the same from your end, if you cannot find any Publicly available APIs.
GET request is used to retrieve data from a
Server. To send a GET request using Postman, follow these steps:
Postman and click the
New button in the top left corner.
2. In the pop-up window, click on the
3. Now, in the
New Requestwindow, enter the
URL of the
Server you want to send the request to in the
Request URL field. The moment, you enter the above URL/Endpoint(https://api.genderize.io?name=scott), you can see the params panel getting populated with the
GET from the dropdown menu next to the
Request URL field. But, by default, you can see the
5. Click the
Send button to send the request.
6. You should now see the response with the
Status Code from the Server in the
Response panel on the right. The response may include data, such as
Here’s a screenshot for your reference:
That’s it! You’ve just sent your first
GET request using
Postman. In the next section, we’ll walk you through the process of sending a
POST request, which is used to create new data on the
I hope this article will be helpful to a greater audience in understanding the basics of APIs and Postman. Please feel free to share your
comments on whether you liked it.
For now, thanks for reading!! If you enjoyed this article, please follow and subscribe for the latest updates. Looking for more? Check out the other articles below:
10 Basic Mac Tools To Empower You In Software Space-Mandatory Skill To Crack Software Interviews❌…
As a Technical Engineer having the right tools can make a big difference in your productivity. These tools add…
How to create daemons in Linux with a simple “Hello World” — bash example!
A daemon is a background process in Linux that performs certain tasks without user interaction.