Meraki API returns "'enabled' must be a boolean"

The_Roo
Getting noticed

Meraki API returns "'enabled' must be a boolean"

Hi All,

I'm working on increasing my knowledge of the Meraki API, doing it through Postman, and I've had good success so far with "GET" actions. Now I'm trying to do some "PUT" actions, specifically trying one that's in the Meraki Collection (to set/reset bonjour forwarding):

 

{{baseUrl}}/networks/:networkId/wireless/ssids/:number/bonjourForwarding

 

I have set some variables as shown

The_Roo_0-1733228938421.png

Now these variables all work with "GET" actions so I'm confident they are right. However, when I send the "PUT" shown above, I get the response:

{"errors":["'enabled' must be a boolean"]}

So I tried putting a new variable in: "enabled". I tried it with and without quotes, and tried the value as 1/0 or true/false (with and without quote marks) but it made no difference, I still got the same error.

 

What I've learned from my "GET" experiments are that in the string:

 

{{baseUrl}}/networks/:networkId/wireless/ssids/:number/bonjourForwarding

 

I need to supply the items preceeded with a ":" mark, so I have variables for networkId and number.

 

I've googled this, but there is only one other similar error shown, and that does not have a conclusive fix.

 

So what am I doing wrong? What do I need to address the

{"errors":["'enabled' must be a boolean"]}

error?

 

Thanks in anticipation!

Roo

 

1 Reply 1
Mloraditch
A model citizen

I'm no dev but use postman a lot, although perhaps not quite the way you are.

 

Take a look here: https://developer.cisco.com/meraki/api-v1/update-network-wireless-ssid-bonjour-forwarding/

This site is great for figuring out issues with your JSON. You can use the gui form to build the JSON and see the formatting that needs to exist.

 

I will caution that the get output does not always match the put for API calls that otherwise seem to match up. There are sometimes added values in gets that don't get put in a put.


Hopefully this helps steer you onto the right path

 

Get notified when there are additional replies to this discussion.