API & Integration

Reply
Accepted Solution

Create Host with Extensible Attributes using WAPI

[ Edited ]
philippbck
Techie
Posts: 4
2055     0

Hello,

 

I want to create a new Host with Extensible Attributes in DDI Infoblox using WAPi via CURL, but I get an error message:

 

curl -k1 -u username:password -X POST https://10.61.20.40/wapi/v2.3.1/record:host?_return_fields=ipv4addrs -H "Content-Type:application/json" -d '{"name":"Test20.int.kn","ipv4addrs":[{"ipv4addr":{"_object_funct  ion":"next_available_ip","_result_field":"ips","_object":"network","_object_parameters": {"network": "10.61.232.0/23","network_view":"default", "*Automatisierbar":"Yes"}}}]}'

{ "Error": "AdmConProtoError: Invalid value for ipv4addr: {\"_parameters\": {\"exclude\": [\"9.0.0.1\", \"9.0.0.2\"]}, \"_object\": \"network\", \"_object_funct ion\": \"next_available_ip\", \"_result_field\": \"ips\", \"_object_parameters\": {\"*Automatisierbar\": \"Yes\", \"network\": \"10.61.232.0/23\", \"network_view\": \"default\"}}: Must be string type", "code": "Client.Ibap.Proto", "text": "Invalid value for ipv4addr: {\"_parameters\": {\"exclude\": [\"9.0.0.1\", \"9.0.0.2\"]}, \"_object\": \"network\", \"_object_funct ion\": \"next_available_ip\", \"_result_field\": \"ips\", \"_object_parameters\": {\"*Automatisierbar\": \"Yes\", \"network\": \"10.61.232.0/23\", \"network_view\": \"default\"}}: Must be string type" }

What is wrong with my Command. I had checked the json data part and it is valid. Anyone an Idea? Thank you!

Re: Create Host with Extensible Attributes using WAPI

Adviser
Posts: 213
2056     0
There’s either a problem with your pasting or perhaps it’s the issue itself but “function” is split into two parts in both the command pasted and in the text of the error. I tried the command and did not get the same error so this leads me to believe you have copy and pasted the command or dome something to cause the extra spaces (or tab) between “funct” and “ion”.
Showing results for 
Search instead for 
Do you mean 

Recommended for You

Demo: Infoblox IPAM plug-in integration with OpenStack Newton