Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Create Host with Extensible Attributes using WAPI
[ Edited ]Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-31-2016 04:33 AM - edited 10-31-2016 05:57 AM
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!
Solved! Go to Solution.
Re: Create Host with Extensible Attributes using WAPI
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-31-2016 06:47 AM
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”.