API Testing Tutorial Part 14 – Sending First GET Request in Postman

Hello Folks,

As part of our API Testing series, we will see “Sending first GET request in Postman”.

First of all we need some APIs to test. There are many public APIs available which you can use for testing purpose. I will suggest you to register at below site to use free APIs for testing:

GoRest API for Testing

I will keep sharing links of public APIs for testing.

Above website provides you APIs for basic operations i.e. CRUD which we have already learnt in previous posts.

To perform a GET request below steps are performed:

  1. Select the “GET” in http methods drop down.
  2. Pass the request URI in address bar of Postman.
  3. Add authorization if applicable.
  4. Add headers if applicable.
  5. Click on Send button.

 

See the image below:

Explanation:

We will pick a GET api from GoRest which list all users:

  • GET /public-api/users/: list all users.

 

Above we see ‘GET‘ which says GET HTTP operation can be performed on resource “/public-api/users/“. To make a proper URI we need to suffix base URL which is “https://gorest.co.in/” with resource name as  “https://gorest.co.in/public-api/users/“.

GET request does not required any body i.e. payload i.e Request body. You can notice ‘body’ tab is disabled in postman for GET request in above image.

Since we don’t require any authorisation and headers as of now, so skipping those tabs. Now click on Send button. You will see response body in JSON down. You can see details of all users listed in response body. Details of one user is below:

Also postman returns you the status code and response time. Response time is the time span in which request was hit to endpoint and return response.

More about API Testing in upcoming posts. Stay tuned.

If you have any doubt, feel free to comment below.
If you like my posts, please like, comment, share and subscribe.
#ThanksForReading
#HappyApiTesting

 

Author: Amod Mahajan

My name is Amod Mahajan and I am an IT employee with 4+ years of experience in Software testing and staying in Bengaluru. My area of interest is Automation testing. I started from basics and went throw so many selenium tutorials. Thanks to Mukesh Otwani as his tutorials are easy and cover basics to advance. I have habit of exploring concepts by deep diving. I used to make notes. I thought of sharing my knowledge through posts and now I am here. #KeepLearning #ShareLearning