- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
API - how to configure an IP address/network ExtensiveAttributes value into IPAM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2020 05:33 PM
hi all, i was trying to assign a network in Public view and successful with IPAM API guide (https://URL/wapi/v2.7/network?network=14.0.0.0/24&_return_as_object=1&network_view=Public View)
but, i would like to configure the extensiveattribute of the network create / ip address create, for EA like Services and IP Owner name.
can anyone share how to configure Services : Metro and IP Owner : JamesBond ?
Thanks.
Re: API - how to configure an IP address/network ExtensiveAttributes value into IPAM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 12:07 AM
Hi,
If you want to add the extensible attributes while creating the network, you can use the following API:
curl -k -u admin:infoblox -H 'content-type: application/json' -X POST "https://grid-master/wapi/v2.11/network?_return_fields%2B=network,extattrs&_return_as_object=1 " -d '{"network": "1.1.1.0/24","network_view":"public","extattrs":{"Services":{"value":"Metro"},"IP Owner":{"value":"James Bond"}}}'
To update the extensible attributres on an existing network, first fetch the object reference of the network, and then update it as below:
curl -k -u admin:infoblox -H 'content-type: application/json' -X PUT "https://grid-master/wapi/v2.11/network/ZG5zLm5ldHdvcmskNjEuMC4wLjAvMjQvMA:61.0.0.0/24/public?_return_fields%2B=network,extattrs&_return_as_object=1 " -d '{"extattrs":{"Services":{"value":"Metro"},"IP Owner":{"value":"James Bond"}}}'
Hope this is helpful,
Krishna
Re: API - how to configure an IP address/network ExtensiveAttributes value into IPAM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 06:33 PM
Krishna, thanks alot. i can use it now.
Just one more question, i checkd in the API doc, networkcontainer creation parameter is not there. I tried networkcontrainer or network_container to replace in existing API , it doesn't work. can you help?
https://url/wapi/v2.7/network?_return_fields%2B=network,extattrs&_return_as_object=1
{"network": "14.1.3.0/24","network_view":"Lab View","extattrs":{"Services":{"value":"MetroE"},"IP Owner":{"value":"James Bond"}}}
Re: API - how to configure an IP address/network ExtensiveAttributes value into IPAM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2020 03:27 AM
Hi,
You need to use /networkcontainer endpoint.
Hope that is helpful,
Krishna
Re: API - how to configure an IP address/network ExtensiveAttributes value into IPAM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2020 04:59 PM
hi kvasudevan ,
Good day. Can you elaborate? I'm not very sure on your suggestion. Thanks.
@kvasudevan wrote:Hi,
You need to use /networkcontainer endpoint.
Hope that is helpful,
Krishna
Re: API - how to configure an IP address/network ExtensiveAttributes value into IPAM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2020 07:33 PM
Hi,
The call will look similar to below:
curl -k -u admin:infoblox -H 'content-type: application/json' -X POST "https://grid-master/wapi/v2.9/networkcontainer?_return_fields%2B=network&_return_as_object=1 " -d '{"network": "1.0.0.0/8"}'
Regards,
Krishna
Re: API - how to configure an IP address/network ExtensiveAttributes value into IPAM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2020 12:54 AM
hi , thanks alot...it worked well.