Reply
Highlighted

API - how to configure an IP address/network ExtensiveAttributes value into IPAM

Authority
Posts: 20
987     0

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. 

 

 

 

 

            "_ref""extensibleattributedef/b25lLmV4dGVuc2libGVfYXR0cmlidXRlc19kZWYkLlNlcnZpY2VzSmiley Frustratedervices",
            "default_value"null,
            "name""Services",
            "type""STRING"
        },
        {
            "_ref""extensibleattributedef/b25lLmV4dGVuc2libGVfYXR0cmlidXRlc19kZWYkLklQIE93bmVy:IP%20Owner",
            "default_value"null,
            "name""IP Owner",
            "type""STRING"
Highlighted

Re: API - how to configure an IP address/network ExtensiveAttributes value into IPAM

Adviser
Posts: 149
987     0

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

Highlighted

Re: API - how to configure an IP address/network ExtensiveAttributes value into IPAM

Authority
Posts: 20
987     0

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"}}}

Highlighted

Re: API - how to configure an IP address/network ExtensiveAttributes value into IPAM

Adviser
Posts: 149
987     0

Hi,

 

You need to use /networkcontainer endpoint.

 

Hope that is helpful,

Krishna

Highlighted

Re: API - how to configure an IP address/network ExtensiveAttributes value into IPAM

Authority
Posts: 20
987     0

hi  ,

 

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


 

Highlighted

Re: API - how to configure an IP address/network ExtensiveAttributes value into IPAM

Adviser
Posts: 149
987     0

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

Highlighted

Re: API - how to configure an IP address/network ExtensiveAttributes value into IPAM

Authority
Posts: 20
987     0

hi , thanks alot...it worked well. Smiley LOL

Showing results for 
Search instead for 
Did you mean: 

Recommended for You