I'm trying to add policy objects using cURL on Windows. I keep getting error "Bad request: There was a problem in the JSON you submitted." I don't have regular access to a Linux machine but when I run this command there it's working. There are a few clients and a lot of entries I need to add and I need to do this work from a Windows computer. What am I doing wrong here? From the Linux machine I use: curl -L -H 'X-Cisco-Meraki-API-Key: redacted' -H "Content-Type: application/json" -X POST --data-binary '{"name":"Test Object","category":"network", "type": "cidr","cidr":"[ip4 address'","groupIds":[]}' 'https://api.meraki.com/api/v1/organizations/[redacted]/policyObjects' and it works: From the Windows machine I use: curl -L -H "X-Cisco-Meraki-API-Key:[redacted]" -H "Content-Type:application/json" -X POST --data-binary {"name":"Test Object","category":"network","type":"cidr","cidr":"ip4 address","groupIds":"[]"} https://api.meraki.com/api/v1/organizations/[redacted]/PolicyObjects -v and I get verbose results here: Note: Unnecessary use of -X or --request, POST is already inferred. * Trying 209.206.54.142... * TCP_NODELAY set * Connected to api.meraki.com (209.206.54.142) port 443 (#0) * schannel: SSL/TLS connection with api.meraki.com port 443 (step 1/3) * schannel: checking server certificate revocation * schannel: sending initial handshake data: sending 185 bytes... * schannel: sent initial handshake data: sent 185 bytes * schannel: SSL/TLS connection with api.meraki.com port 443 (step 2/3) * schannel: failed to receive handshake, need more data * schannel: SSL/TLS connection with api.meraki.com port 443 (step 2/3) * schannel: encrypted data got 4017 * schannel: encrypted data buffer: offset 4017 length 4096 * schannel: sending next handshake data: sending 93 bytes... * schannel: SSL/TLS connection with api.meraki.com port 443 (step 2/3) * schannel: encrypted data got 258 * schannel: encrypted data buffer: offset 258 length 4096 * schannel: SSL/TLS handshake complete * schannel: SSL/TLS connection with api.meraki.com port 443 (step 3/3) * schannel: stored credential handle in session cache > POST /api/v1/organizations/[redacted]/PolicyObjects HTTP/1.1 > Host: api.meraki.com > User-Agent: curl/7.55.1 > Accept: */* > X-Cisco-Meraki-API-Key:[redacted] > Content-Type:application/json > Content-Length: 74 > * upload completely sent off: 74 out of 74 bytes * schannel: client wants to read 102400 bytes * schannel: encdata_buffer resized 103424 * schannel: encrypted data buffer: offset 0 length 103424 * schannel: encrypted data got 385 * schannel: encrypted data buffer: offset 385 length 103424 * schannel: decrypted data length: 356 * schannel: decrypted data added: 356 * schannel: decrypted data cached: offset 356 length 102400 * schannel: encrypted data buffer: offset 0 length 103424 * schannel: decrypted data buffer: offset 356 length 102400 * schannel: schannel_recv cleanup * schannel: decrypted data returned 356 * schannel: decrypted data buffer: offset 0 length 102400 < HTTP/1.1 400 Bad Request < Server: nginx/1.21.4 < Date: Mon, 06 Dec 2021 21:15:15 GMT < Content-Type: */*; charset=utf-8 < Content-Length: 58 < Connection: keep-alive < X-Request-Id: 7373e325bb2d286c34a5073594e50c08 < X-Runtime: 0.001559 < Strict-Transport-Security: max-age=15552000; includeSubDomains < Bad request: There was a problem in the JSON you submitted* Connection #0 to host api.meraki.com left intact
... View more