Skip to content

Environmental Variable

Ben Weese edited this page Jun 14, 2019 · 2 revisions

So an Environmental Variable is very useful. When first learning Postman you use it to store the url of the api so that your collection can use {{url}} instead of having to type it every time. Plus if you want to change from a development environment to test or production you can by just changing it in one place. You can also story your API key and various other things.

If you look at the page Reusable Code you can see that we store the functions in the Environmental variable. You can even use it to store an output from one API call and use it on another. For instance you could get they type of a character in a list of characters and store the typ in the Environmental variable. Then you can call that when making a call for the type. It is magical.

You can also use a global variable for this as well.

Clone this wiki locally