

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is an Environment Variable in Postman?
A variable is used to store and add parameters in a request, Collection, scripts and so on. An Environment in Postman comprises a key-value pair. The key in an Environment is known as the Environment variable.
An Environment variable has a local scope which means a variable defined within an Environment can be accessed in the same Environment in which it is created. In case we try to access that variable outside the Environment in which it is created, we shall encounter errors.
To create an Environment variable we have to follow the below steps −
Step 1 − Click on the New menu and then click on the Environment link.
Step 2 − The MANAGE ENVIRONMENTS window shall be opened. Give an Environment name – ENV1. Add a variable u for the VARIABLE field and https://jsonplaceholder.typicode.com/users for the INITIAL VALUE.
Step 3 − The Environment – ENVI gets added as an item in the No Environment dropdown.
Step 4 − Choose the Environment ENV1 and add {{u}} in the address bar. To use an Environment variable in a request, we have it enclose it with double curly braces {{<Environment variable name>}}.
Step 5 − Click on Send. Here, we have used the Environment variable – {{u}} instead of the actual endpoint in the address bar.
- Related Questions & Answers
- How to Create an Environment in Postman?
- What is PYTHONPATH environment variable in Python?
- What is JAVA_HOME variable in Java Environment?
- How to get the value of environment variable in Postman?
- How to Use Environment Variables in Postman?
- What is Postman Sandbox?
- What is Postman Console?
- What is Newman in Postman?
- How to substitute an environment variable using sed on Linux?
- What is the computing environment?
- What is maven in Java environment?
- What is API Documentation in Postman?
- What is Java run time environment?
- How to set a global variable in Postman?
- How to create a Global Variable in Postman?