Update Request URLs in Bulk in Postman collection

all Postman lovers,

Here you go , I have created command line utility that allows you to update URLs in bulk in Postman collection file .

Now you dont have to worry about replacing request URLs across all your collections when the project structure changes . You just have to run

npx postman-collection-url-updater -c “collection.json” -r “https://localhost:23456/api/v1/{{path}}” -w “{{baseURL}}/{{path}}” -s “new_collection.json”

In the above example all the urls will have the https://localhost:23456/api/v1/{{path}} part get replaced with {{baseURL}}/{{path}} . :heart:

Please do try it out and let me know your thoughts and comments :raised_hands::raised_hands:

6 Likes

:tada::tada::tada::heart_eyes: #500 + #Downloads so far :
postman-collection-url-updater - npm

Hi Linkedin Family and all Postman lovers

postman-collection-url-updater #v3 is out :heart::heart:

I have added one more utility #postman - #collection - #aggregator to the project , now you can consoilidate/move multiple collections into single collection. :heart_eyes:

just install the package and run the below command

npm i -g postman-collection-url-updater

postman-collection-aggregator -l “./collection1.json” “./collection2.json” -n “new_collection”

This will create a new collection called “new_collection” with sub collection 1 and 2 as sub folders , all variables will be added to the new_collection

postman-collection-aggregator -d “./collectionDirectory” -n “new_collection”

you can also simply pass the directory containing all the collections instead of individual files

It was a rollercoaster ride of learning:

  1. Creating a nodejs cmd utility

  2. Writing Github action, to run in linux, windows, and Mac

  3. Creating automatic npm publish and writing Github pages

  4. Writing Jest unit and system test

  5. Learning Jest coverage test and Mocks

Will write an article soon with all the information

#sdet #testautomationengineer #article #postmanapi #postman #nodejsdeveloper #qaengineer #medium #javascriptdeveloper #js