API queue JSON files

Hi All,

I hope I’m not duplicating a post somewhere on here already.
Im brand new to Postman, and API’s in general.

What Im trying to do is upload some data to a sever using JSON files through postman. This method is being used in my company for different kinds of data, but for me, I need it to upload, usualy 400,000+ CSV lines that have been converted to JSON.

This is attendance data for schools.
So it looks something like this (in the json files):

"LearnerCode": "1515151",
"Date": "03/10/2017",
"RollCallSession": "AM",
"AttendanceCode": "/",
"MinutesLate": "",
"Notes": ""

The problem is that thats a lot of data over the last 2 years, so I end up splitting the JSON files into approximately 120,000 lines in order for the system to not TIMEOUT.

Is there a way to have all these JSON files to use the POST method one after another? Or perhaps after a specific time?

Expected behavior
Essentially I want to be able to use POST method to send the requests one after another, once the first file has completed and not come into Postman after 20-30 mins once the first file is done, then copy and paste the contents of the next JSON into the body and click send again.

App information (please complete the following information):
Postman for Windows
Version 7.2.1
win32 10.0.17134 / x64

Additional context
This method is used to transfer data from the old system, to the new cloud based system.

I attempted to do something with the Runnre function, but I dont think its designed for this specific use.

Thanks for any help on this.

Hi @a1nteligence,

Welcome to the Postman community ! Instead of splitting the JSON files over and over again, I think a better alternative would be to use a single JSON file and use the pm.setNextRequest(‘requestName”) script to loop through the same request multiple times and iterate over the JSON files based on the row number for each subsequent request. Further Information about branching and looping through requests can be found on the following link: https://learning.getpostman.com/docs/postman/scripts/branching_and_looping/.
Hope that helps.

I tried doing that, but I cant seem to figure it out.
Not really proficient in javascript.

How would I set it up to iterate after, say, 100,000 lines?