0% found this document useful (0 votes)
8 views2 pages

Day3 - API - Variables, Console and Runner

The document discusses how to check APIs in a browser using the Network tab and describes how to create and use variables in Postman at different levels (collection, environment, global) to store common values like a domain that can then be called in API requests using {{variable_name}} syntax. It also briefly mentions the Postman console for viewing API logs and data and the Postman Runner for running multiple APIs multiple times.

Uploaded by

Test One
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Day3 - API - Variables, Console and Runner

The document discusses how to check APIs in a browser using the Network tab and describes how to create and use variables in Postman at different levels (collection, environment, global) to store common values like a domain that can then be called in API requests using {{variable_name}} syntax. It also briefly mentions the Postman console for viewing API logs and data and the Postman Runner for running multiple APIs multiple times.

Uploaded by

Test One
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

How to check APIs in browser:

We can check the APIs working behind the website using the ‘Network’ tab.

With the help of Network calls we can verify which API is failing if any defect is found.

1. Inspect webpage
2. Goto Network tab
3. Refresh the page.
4. We will get all the Network call or API working behind the website.

Postman variables:
Variables are used to store a value which can be use wherever it require.

In all the API, whatever common feature/value is present we can save that value in variable and call
it as per need.

Domain is a common thing in all the APIs present in a single website/project, so we can add this
domain value into variable.

We can create a variable 3 places:

1. Collection level
2. Environment level
3. Global level

Environment level variables has highest priority, that means if we have created a variable at all the
places with same name then the APIs will call that variable from Environment.

How to create a variable at collection level:

In collection we have variable tab.

Here we can give a variable name and store the value.

The scope of this variable will be inside that collection only.

How to create a variable at Environment and Global level:

We can create a variable at Environment level and the scope of that variable will be till all the
collections.

On top right corner we have environment section.

1. Click on ‘Environment quick view’ option or eyeball.


2. Add the new environment.
3. Give variable name and store a variable value.

Similarly we can create variable at global level, just below the environment variables.
How to call a variable/how to use a variable:

To call a variable in APIs we can use ‘{{ variable_name }}’ this format.

It will show, what is the value of that variable and from where it is coming.

Postman Console:

In postman console we can see all the requested APIs log.

Also we can print the data in console.

Postman Runner:

With the help of ‘Runner’ we can run multiple APIs, multiple times at once.

You might also like