So there is an API that is being tested in POSTMAN. There are thousand of json files that needs to be sent as body while making POST request to the API. Is there any way in POSTMAN or any other tool or script that can make this process easier and automated. Those json files hold the resources, each json file is something like this:
{
"resourceType": "Bundle",
"type": "transaction",
"entry": [
{
"fullUrl": "12234",
"resource": {
"resourceType": "Player",
"name": [
{
"family": "James",
"given": [
"Smith"
]
}
],
"gender": "male"
},
"request": {
"method": "POST",
"url": "Player"
}
}
}
With that post api request, there is cognito token, api key that is being sent. In short how can I loop through multiple json files and put each in request body while making POST request at API URL.
CodePudding user response:
Demo: