Change all references to variable in a workspace or collection

Your question may already have an answer on the community forum. Please search for related topics, and then read through the guidelines before creating a new topic.

Here’s an outline with best practices for making your inquiry.

My question: I want to change an environment variable name. It is used everywhere in a workspace. Is there a simple way to change all the locations it is used instead of having to go through each individual request and changing the name manually?

hi @michael.harris - you can try Find and Replace in the desktop app: https://learning.postman.com/docs/getting-started/navigating-postman/#find-and-replace

Thanks. I used that, but I’m now seeing something interesting. The items I replaced are not showing up for others as replaced. Also, some of the items I replaced show up in the pre/post scripts and the URLs as changed, but when I run the request, the old value is being referenced - so it fails.


The item in the red square was changed to: knownPatientId

If I perform a search, there are no results for: knownPatientID. I checked in the prerequest script and request parameters and the appropriate text is there.

I think I may have found an issue: When I did find and replace, any URL that had a replacement in it did not recognize the change. When I made a pointless change, like add a space to the end of the URL and resaved the request, then the change was recognized.

I have some co-workers reporting that they still don’t see the changes I made in the workspace. I am trying to figure out why this is and how to fix it.

1 Like