Infoblox’s global team of threat hunters uncovers a DNS operation with the ability to bypass traditional security measures and control the Great Firewall of China. Read about “Muddling Meerkat” and the many other threat actors discovered by Infoblox Threat Intel here.

API & Integration, DevOps,NetOps,SecOps


powershell + curl + put = failure

Posts: 7
1963     0

The following command line curl PUT fails::


.\curl.exe -u jblueSmiley Tongueassword -H 'Content-Type: application/json' -X PUT '' -d '{"extattrs+":{"City": {"value": "Denver"}}}'


with the following error:


{ "Error": "AdmConProtoError: JSON Decoding: Expecting property name: line 1 column 1 (char 1)",
"code": "Client.Ibap.Proto.JSONDecoding",
"text": "JSON Decoding: Expecting property name: line 1 column 1 (char 1)"


I have went over the syntax a million times and I cannot figure out what is wrong.  Thoughts?

Re: powershell + curl + put = failure

Posts: 7
1964     0

So I got this to work using native powershell:


$json = '{"extattrs+":{"City": {"value": "Denver"}}}'
invoke-restmethod -uri "" -Headers @{ Authorization = "Basic "+ [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes("jblueSmiley Tongueassword")) } -Method Put -Body $json -ContentType 'application/json'


Still would like to figure out why curl fails ... 

Re: powershell + curl + put = failure

New Member
Posts: 8
1964     0

I have seen something similar before where the WAPI call is correct but if using any curl commands that has JSON data from Windows environment does not work. However, if the exact same WAPI call is used from Linux it works. The issue was related with curl/Windows.


To narrow this down, could check the following:


1. Check if WAPI calls that does not have JSON encoding i.e (-d '{key:value}' work. For example, does this command work from Windows cmd/PS?


curl -k -u user:pass -X GET

2. Check to see if if WAPI calls that have JSON format in fail when used from Windows cmd/PS.


3. Run the exact same WAPI calls from a Linux terminal and check if it works.

Showing results for 
Search instead for 
Did you mean: 

Recommended for You