Open In App
Related Articles

Basics of API Testing Using Postman

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

APIs(Application Programming Interfaces) are very commonly used in development. Postman is a tool that can be used for API Testing. In this article, we will learn how to do simple API Testing using Postman.

  1. Go to your workspace in Postman.
  2. Click on the + symbol to open a new tab.
  3. Enter the API Endpoint where it says, “Enter request URL” and select the method (action type GET, POST, etc.) for that request as shown below.
  4. Click on the Send button.

Now as you can see in the tab below, the response received from the API is shown along with the status 200 which implies that the request has succeeded.

For a post method, you can also specify the body of the request in any of the formats listed.

  1. Select method as POST and write the request URL.
  2. In this example, we will be sending request data in JSON format. For this, Go to Body and select raw from the radio buttons listed. Then, select JSON.
  3. Write the request body(you can also enter headers if required) and hit Send.

As you can see in the image above, status 201 is received implying that the request was successful and the resource has been created.  More information related to the API call can be found under the “Headers”. You can also save the request by clicking on the save button and adding it to a collection in Postman. 


Last Updated : 18 Oct, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads