Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Postman: How to delete/clear postman environment variable at run-time

Tags:

Is there any way to delete/clear postman environment variable using functions at runtime. I could possibly set to blank or some special value but is there a general way of doing things.

like image 416
overflower Avatar asked Apr 06 '17 05:04

overflower


2 Answers

Sandbox API pm.environment.unset(variableName) also allows to do that.

In case is you want to clear all environment variables at once - you might want to do: pm.environment.clear().

This will clear all your environment values.

Refer: https://learning.postman.com/docs/postman/scripts/postman-sandbox-api-reference/#pmenvironment

like image 109
Saurabh Gulati Avatar answered Sep 20 '22 09:09

Saurabh Gulati


Ok - so this does it.

postman.clearEnvironmentVariable("key");
like image 31
overflower Avatar answered Sep 18 '22 09:09

overflower