![]() ![]() ![]() It is important for the first cell, basically the header, to contain the variable that we are replacing. You can use Excel, Numbers, or a code IDE like Visual Studio Code, to create the CSV file. So once we’ve edited a PUT command and saved it to our collection, we can create a CSV file that contains a list of policy numbers. That’s all we need to send as a PUT to the policies API endpoint. To disable a policy you just need to pass the following XML using a PUT command: The reason we do this is so we can gather commands that are similar for use over and over again. The first thing we want to do is create our API command that we want to run and save it to a collection. For example, if you needed to disable a group of policies, you could pass a CSV file with a list of policy IDs to a Collection Runner and allow it to send the necessary PUT commands. It also allows you to feed values into those commands using the variables that we talked about in Part 2. A Collection Runner allows you to run a sequence of API commands in a specific order. To me, the real power of Postman is the Collection Runner function. ![]() We saw this in Part 1 when we setup our environment variables to store username, password, and URL, and again in Part 2 where we were able to set the ID of a policy using a variable and a Pre-request script. Just like in computer programming, we can leverage variables in Postman to store data that we need to re-use. We touched briefly on variables in Part 2 when we discussed the use of variables to set the ID of a policy. Today we’re going to dive a little deeper into the use of variables and the Runner feature in Postman. Using Postman with Jamf Pro Part 3: Computer Groups Using Postman for Jamf Pro API Testing – Part 2: Creating And Updating Policies Using Postman for Jamf Pro API Testing – Part 1: The Basics If you haven’t checked out the previous posts, or you’ve never used Postman with the Jamf Pro API, you may want to go read through these: Welcome back to my series on using Postman with Jamf Pro. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |