/ postman

Postman - Data Driven API requests

I've always known that Postman is powerful tool and a must for any developer and for several years I've been using it just for some trivial testing, nothing too crazy until I found the need to actually do something more meaningful with it.

Recently I had the need to ingest a whole lot of data into the system I'm working on, but the data was scattered across the system and pushing the data straight into the database would be a nightmare.

I already had the process to ingest the data one by one through an API and I didn't want to build something to ingest in bulk just to be used once in a life time. I knew Postman was probably the answer so I started digging.

I found this guys, Valentin Despa, on YouTube showing how you can automate a bunch of API calls using pre-request script to loop through a javascript array and updating environment variables on the way. That was a great start, but it wasn't the full answer as I had a JSON file with thousands of objects that I wanted to turn into requests.

Then I found this other guy, Raghav Pal, also on YouTube showing exactly what I was looking for which was ingesting the API requests using a JSON file.

Just to keep a record here how much I appreciate people sharing their work. It makes my life so much easier and I bet it makes yours too :D

Cheers

Buy me a coffeeBuy me a coffee
Thiago Passos

Thiago Passos

I'm Thiago Passos, a Solution Architect working for SSW sharing what I've been working with and learning. Love technology, dancing and I get unfriendly when I'm hungry.

Read More