If you have a list of user IDs that you’d like to use in a bulk payload like the one you provided, there are a bunch of ways to generate this dynamically.
Postman Scripts with External Data:
Postman supports running collections with a data file (like JSON or CSV). You can structure your request to use variables, and the values for these variables will be picked from your data file.
In your request body in Postman, replace the specific ID with a variable, like "path":"/Users/{{userID}}".
Use a data file with the structure:
[
{"userID": "ID1"},
{"userID": "ID2"},
...
]
Then run the collection with the Runner, selecting the data file. Postman will iterate over each data point and replace the {{userID}} variable with the respective value.
Node.js Script:
If you’re comfortable with a bit of programming, you can write a simple Node.js script to generate the payload.
Excel or Google Sheets:
If you have your user IDs in an Excel sheet or Google Sheets, you can use formulas to generate the JSON structure for each user ID. Once generated, you can copy and paste these into a JSON file.
Hope this helps! If you have other questions, let me know!