Are you interested in our Early Access Program (EAP)? This program allows you to preview code, test in your lab and provide feedback prior to General Availability (GA) release of all Infoblox products. If so, please click the link here.

Freeware & Evaluations


Create Host Record.. record:host with Powershell against WAPI V2.0

Not applicable
Posts: 1
4762     0
Basically I canoot get this to work in PS or in Pearl which makes me wonder if the syntax has changed A Get command: the Get Result: bullet3falserecord:host_ipv4addr/ZG5zLmhvc3RfYWRkcmVzcyQubm9uX0ROU19ob3N0X3Jvb3QuMC4xNDMxMDA2MTg0MjE4LmJ1bGxldDMuMTAuMTAuNjEuMzAu: The above is correct theere is only one host configured on the system... the problem arises when I try to create a host A POST command:{{'ipv4addrs':%20[{'ipv4addr':%20''}],%20'name'... The Post Result: { "Error": "AdmConProtoError: Unknown argument/field: '{{'ipv4addrs': [{'ipv4addr': ''}], 'name': 'hostname.localdomain'}'", "code": "Client.Ibap.Proto", "text": "Unknown argument/field: '{{'ipv4addrs': [{'ipv4addr': ''}], 'name': 'hostname.localdomain'}'" } In Pearl: curl -k -i -u "admin:infoblox" -X POST -d {"ipv4addrs":[{"ipv4addr":""}],"name":"host.localdomain"} HTTP/1.1 400 Bad Request Date: Thu, 07 May 2015 16:41:35 GMT Cache-Control: no-cache, no-store Pragma: no-cache Content-Type: application/json set-cookie: ibapauth="ip=,client=API,group=admin-group,ctime=1431016895,timeout=600,mtime=1431016895,su=1,auth=LOCAL,user=admin,rDjEfnaSExUd3CNQQ8dyIEQnQ+Nl40RTTKM"; httponly; Path=/; secure Connection: close Transfer-Encoding: chunked { "Error": "AdmConProtoError: Unknown argument/field: 'ipv4addrs:[{ipv4addr:}]'", "code": "Client.Ibap.Proto", "text": "Unknown argument/field: 'ipv4addrs:[{ipv4addr:}]'" Any Help at All would be appreciated, this API isn't one of the most intuatve that I'v worked with. Thanks. Scott

Data fields on POST need to be in JSON format

Posts: 33
4762     0

I'm pretty sure that your problem is that you need to specify that the data submitted as part of the POST request is in JSON format. For example, if I do the following Curl command then it works as expected and the host record is successfully created:

curl --tlsv1 --user 'admin:infoblox' --header 'Content-Type: application/json' --data '{"name": "", "ipv4addrs": [{"ipv4addr": ""}]}' ''

However if I omit the --header option, as in the following command:

curl --tlsv1 --user 'admin:infoblox' --data '{"name": "", "ipv4addrs": [{"ipv4addr": ""}]}' ''

then I get the exact same error you're seeing.

Re: Data fields on POST need to be in JSON format

Posts: 1
4762     0

I have similar error


{ "Error": "AdmConProtoError: Unknown argument/field: 'ipv4addrs'", 
"code": "Client.Ibap.Proto",
"text": "Unknown argument/field: 'ipv4addrs'"

when doing PUT request  https://[GRID]//wapi/v2.3/record:a/_ref (reference here) and neither { [ { "ipv4addr":"" } ] } nor { "name":"","ipv4addrs":[ { "ipv4addr":"" } ] } help. 

Showing results for 
Search instead for 
Did you mean: 

Recommended for You