Most frequently asked questions about Postman

Janvi B Bhuva

Mar 02, 2020

4 min readLast Updated May 03, 2022

How postman works

A postman is a popular tool for interacting with HTTP API clients that makes it easy for developers to generate, share, test and document APIs. Postman gives a friendly GUI for creating requests and responses.

Postman becomes helpful for the user when it comes to executing APIs, as once you have entered and saved them you can simply use them furthermore repeatedly without having to remember the precise endpoint, headers, API key, etc. Postman allows for the repeatable, reliable test that can be automated and used in different environments and simulating how a user might be interacting with the system.

How postman generate OAuth signature

OAuth is an authorization framework that enables applications to obtain limited access to the user on the HTTP service like Facebook, GitHub, Twitter, etc. It helps the user to access the third-party application using the authorizing token.

To generate the OAuth in postman, register with the Imgur and then hit the URL to register your application Provide Application name, Authorization type, authorization callback URL, Email and hit submit.

On registration, gives you clientid and clientsecret which is then used to authorize the user.

Now open the postman application and go to the authorization tab, select Oauth 2.0 authorization from the drop-down and select Get New Access Token.

A panel with different values will open and need to fill up the values.

Press Request token and a new window will open asking for the credentials for the Imgur and login into the Imgur. After pressing the allow, will receive the access token and the other details like the time the access token will expire, type of token, scope, refresh token, accountid, and accountusername. Press use token on the manage access token screen and then select Postman token from the dropdown panel.

The token then will be appeared in the access token field.

Press preview requests to update the header automatically and you can see the authorization token in the headers tab.

How postman send a file

After setting the Request URL and the Request method as POST, on the body tab select form data and pass the key name as “image” and then select the file in the value type from the drop-down given on the right corner of the key column. “Select files” button will appear in the value column which will allow the user to select the file from the file folder. Now run the API and file uploaded successfully.

How postman API works and Postman tool works

Postman is an interactive and automatic tool for verifying the API. It works in the backend and makes sure that the is working as expected. Postman can create a request and gives the response to make sure that it contains the element that we want in the API.

Postman allows us to build, test and modify the API. It has the ability to make various types of requests like Get, Post, Put, Patch, Delete and save the API for the later use. Also, can save in the environment variable for further use.

Postman allows generating a script/test for the API to check the response. Postman also supports the feature of “Snippets” through which we can generate the code using various languages like Java, Python, C, etc.

Testing the Postman API following points should be considered:

  1. Check the expected result
  2. Check for the correct status code
  3. Check for response time
  4. Negative test to perform that API doesn’t respond if data has tampered.

Postman allows running the collection containing a group of APIs using the feature called “Collection runner” and shows the result with the count of Pass and Fail test.

How postman works internally

A postman is an API tool that allows us to send a request and get a response in return. Postman ensures that the service is up and running as expected. It allows hitting the API endpoints by creating the request as per the requirements and verifying the response parameters like status code, headers, and the actual response body.

Postman allows features like:

  1. API test development
  2. Setting up mock endpoints for API
  3. Assertions for the response received from API
  4. Integration with CI-CD tools like Jenkins etc.
  5. Automating API tests

How to use environments variables

Postman contains two types of variables - global variables and environment variables. Global variables are used for all the request, environment variables are defined as per specific environment created. Global variables are edited from the eye-shaped icon in the top right corner once they are added. Postman allows setting the environment variable by using the snippets given beside the test script editor or by creating the script using

pm.environment.set("variablekey", "variablevalue");

Postman also allows the setting of the global variable by using the snippets given beside the test script editor or by creating the script using

pm.globals.set("variablekey", "variablevalue");

Once the environment and global variables are defined it can be used in the request with the format surrounded by the curly brackets {{variable_name}}

· · · ·

Third Rock Techkno is a leading IT services company. We are a top-ranked web, voice and mobile app development company with over 10 years of experience. Client success forms the core of our value system.

We have expertise in the latest technologies including angular, react native, iOs, Android and more. Third Rock Techkno has developed smart, scalable and innovative solutions for clients across a host of industries.

Our team of dedicated developers combine their knowledge and skills to develop and deliver web and mobile apps that boost business and increase output for our clients.