I want to download more than 100k app definitions from api (json) I have simple script for this:
BASE_PATCH="/media/sf_1/getappid/"
rm -rf ${BASE_PATCH}results
while read -r package <&3; do
mkdir -p ${BASE_PATCH}results
curl "https://api.test.com/v2/appid/${package}" -X GET -H "API-KEY: XxXxX-xXxXxXx" -H "Content-Type: application/json" --output ${BASE_PATCH}results/getappid.json
done 3<${BASE_PATCH}appIdId.json
And this is working, but it makes one request per loop - and it takes a lot of time (hours). So my idea is to do it in parallel so. 1. Take first 5 ids from list (in file) 2. Start downloading those 5 json files 3. after it is finished take next 5 ids
Maybe someone have idea how to to this. I want to stick with curl, now i want to download something, but probably soon I will need to use POST, PATCH or PUT (so tool need to have those options)