- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

add network - json format
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-27-2018 02:03 PM
I realized after several months that my 'add network' code isn't working. The JSON I'm passing checks out, but I get a "bad value for network" no matter what I do.
$ curl -k --netrc-file creds -H "Content-Type: application/json" -X POST https://ipamhost/wapi/v2.3.1/network -d '{"network":{"value":"66.18.54.96\/27"},"extattrs":{"Circuit_id":{"value":752370},"Description":{"value":"BUS-Internet"},"Group":{"value":"STATIC_SUBNET"}},"name":{"value":"66.18.54.96"}}' { "Error": "AdmConProtoError: Bad value for network: '{u'value': u'66.18.54.96/27'}'", "code": "Client.Ibap.Proto", "text": "Bad value for network: '{u'value': u'66.18.54.96/27'}'"
I've tried many permutations, including changing the position of the network tag within the larger JSON, removing the CIDR, removing the delimiting \ before the CIDR, removing all the other EAs, etc. I still come up with 'bad value for network'.
If I just have the below snippet for the payload, it works, but I can't add EAs that way...not to mention, in the long run I'll be calling this from php and it will be using a JSON payload.
-d network=66.18.54.96/27
What am I missing? Any help is appreciated!
Thanks!
Blair
Solved! Go to Solution.
Re: add network - json format
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-27-2018 11:07 PM
Hello
i am new here
_______________
kerela tour packages for couple
Re: add network - json format
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-28-2018 02:35 AM
hello
I am new here
___________________
kerela tour packages for couple

Re: add network - json format
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-28-2018 07:46 AM
Try this:
curl -k -u admin:infoblox -H "Content-Type: application/json" -X POST https://192.168.32.10/wapi/v2.5/network -d '{"network":"192.168.51.0/24","comment":"test"}'
Re: add network - json format
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-30-2018 07:14 AM
Thank you! That worked! Apparently I just need to be sure to put only true extattrs in that array.