Postman: Creating Environments

Profile picture for user arilio666

In postman, we have an environment that is a set of variables that we can use in postman requests. It can be apikey, endpoints, etc.

Things that we use repeatedly can be set as variables here in the postman environment. Used to group values and manage access to shared postman data when working as part of a team.

Why environments?

  • We can have production API and development API at different locations.
  • Every environment includes a variable to store the base URL.
  • Each request in collection refers to the variable in the URL field.
  • Can toggle between development and production environment to test them.

Ok, let us see how we can create an environment. During this article, we are using the postman version 9.0.9.

Step 1: On the left corner of our workspace, there is an environment toggle. Click that and hit new.

Step 2: Hit Environment from this building block.

Step 3: Name your environment and click on save. That's it our environment is created.

This is an existing environment where we have set the API key as an environment variable. We will see about variable creation in our environment in another article.