Iterate JSON files

I have a folder of 100 json files that I need to upload to an endpoint. The request code looks like this:

curl --location --request POST 'https://mywebsite.com/upload'
--header 'Authorization: Basic clkwen3n2,mn4mns'
--header 'Content-Type: application/json'
--header 'Cookie: __cfduid=d798234312e4df616eb234598839773'
--data-raw '{"user": "me", "id": "38482", "status": "active"}'

But instead of copy pasting the JSON from each of the 100 files into the raw tab of the request and sending, I was hoping there was a programatic way to iterate through all 100 files, set the body dynamically to the contents of the json file and post it.

How can I achieve this?

This isn’t quite a Postman question, but I’m sure happy to help.

You can just write a script to iterate over the files and update your curl statement.

It would be pretty easy to do that in Powershell.