Using a Put give 200 response but no data inputted

I’m trying to input some data into our Cisco Meraki using Postman Runner with a CSV file. Using Put {{baseUrl}}/networks/{{networkId}}/groupPolicies/{{groupPolicyId}}

I have the BaseUrl, and network ID put into the environment. For group policy, I have a column in my CSV for that.

When I run the put from post man runner, I get a 200 ok response, but no data is being put into where it’s supposed to go. Also Below the actions, it says This request does not have any tests.


Hi Arwen :raising_hand_woman:t2:.

I was able to send a successful PUT request using a different API called Airtable. Maybe sharing what I did will help us troubleshoot this issue.

Here I go:

  1. First, I made sure I was hitting the correct environment with the right variables and Bearer Token:{{baseId}}/Types/{{recordId}}

It sounds like you’re passing in what you need to call updateNetworkGroupPolicy, so I think you’re good here.

  1. Then, I set my Headers to have the correct Content-Type for the Body I’m sending:
    Content-Type: application/json

:thinking: What are you passing in for Content-Type?

  1. Finally, I needed to make sure I was providing the properties required in the JSON Body:
    {"fields": {"Botanical Name": "TESTING 100"}}

From the updateNetworkGroupPolicy docs, it looks like the properties you need to pass in are name and scheduling. :point_right:t3: Does your CSV file reflect that?

Hi Maricrisbonzo,

The content type is correct. As for the headers, I have the following…
comment policy protocol srcPort SrcCidr destPort destCidr SyslogEnabled
These are the settings within that page that I’m trying to change.
When I did a get of an existing policy with firewall rules, I got those same headers. This SHOULD work… I think… haha I REALLY don’t want to have to input almost 300 rules manually.

I didn’t realize you were trying to use the Postman Collection Runner.

Have you been able to successfully run a single PUT request? If not, I would try just to make sure the request even works. Also, can you please share the Response Body you’re getting?

Here’s what I did to successfully run 5 iterations of a PUT request via Postman Runner:

Step 1. Make sure the PUT request works:

Btw, in Headers I only have Content-Type set to application/json. And in Tests I’m only checking whether or not the response status I get is 200:

pm.test("Status code is 200", function () {;

If you look at the Test Results in the screenshot above, you’ll see that this test passed.

Step 2. Cool. Now that I know my PUT request works, I’m going to turn the values of name & job into variables. This way, Postman Runner will be able to map every row of name and job from my .csv file to these variables.

My .csv file looks like this:
Screen Shot 2020-10-10 at 7.56.03 PM

Step 3. Now let’s use Postman Runner!

Awesome, every PUT request received a 200 response status:

And if we look at the Response Body of one of the logs in our Console, we’ll see that the information we were hoping to update was indeed updated:

Btw, I learned about these steps from this video by The Testing Academy :nerd_face:.

1 Like

I was able to get everything imported, but I had to convert the CSV to JSON format and not use runner. Which is a little unfortunate, but it is what it is.