How To Use CSV File To Run Collection for Skytap API

I am looking to use Postman to update a single setting on an Environment within Skytap. Environments in Skytap are essentially where a VM or multiple VMs live.

The API call from Skytap’s API is a PUT request:
https://cloud.skytap.com/v2/configurations/{{configuration-id}}

So in this scenario, the {{configuration-id}} is an actual numeric id from Skytap that identifies a specific environment.

The “Body” of the request would contain the following JSON:
{
“suspend_type”: “”
}

This essentially turns off the auto-suspend power settings within this specific environment.

Now, imagine a scenario where I have 20 environments I need to do this for. Sure, I could do one call at a time and just change the environment id in the call, but I’m looking to use the Runner + a data.csv file with simply one column called “configuration” and then the rows would be the 20 environment ids.

In the end, the result would be that all 20 environments referenced in the CSV file would have the call above executed against them.

Thank you for considering assisting on this and I looked forward to any guidance.

Here is the Skytap API documentation for this call:
https://help.skytap.com/API_v2_Documentation.html#Disableautomaticsuspend

Hi rossidude,
Have you seen this documentation?
https://blog.getpostman.com/2014/10/28/using-csv-and-json-files-in-the-postman-collection-runner/?

I was able to create a CSV file that contained the configuration Id and Suspension type:

Screen Shot 2020-02-03 at 9.38.12 AM

and use the collection runner to indicate the CSV file:

The collection runner will execute the request while iterating through the list of variable in the CSV file.

My body looks like:
{
“suspend_type”: {{suspenstion_type}}
}

and the request:
https://cloud.skytap.com/v2/configurations/{{configuration}}

Hope that helps.
John