1

I feel like I am going insane. I've been using the Postman application as a GUI to test out APIs. I have made a Collection scope variable, and I want to remove it. There is no indication that I can do this through the GUI. The following should work according to many resources online:

pm.collectionVariables.clear();

But I have no idea where to type this into the Postman GUI. Every resource assumes that I already know. How do I open a console that I can toss this command into?

Destroy666
  • 12,350
Eric
  • 13
  • 3

1 Answers1

1

That's code which is executing Postman's JS API rather than a "command". You can use it in either Pre-request Script or Tests here: Tabs

Read more about scripts here.

Also note that'll clear all variables. To delete just one, use:

pm.collectionVariables.unset('varName');
Destroy666
  • 12,350