THE GAME HAS CHANGED

Introducing Infoblox Universal DDI ManagementTM

Watch the launch to discover the new era of management for critical network services. Watch Now

API & Integration, DevOps,NetOps,SecOps

Reply

Update Name attribute for a fixed address using infoblox API

New Member
Posts: 3
5118     0

Hi,

 

I was wandering if anyone can help me use the infoblox API to update the name attribute for a fixed IP adress. 

I know that its possible to update record fo type host, but is there capability in the API to update that name attribute if the record wasnt of type host?

 

MicrosoftTeams-image.png

Re: Update Name attribute for a fixed address using infoblox API

Superuser
Posts: 22
5119     0

Yes, it is possible to update the 'name' field of the Fixed Address. But beware that 'name' is not the same as a hostname in DNS, it is just a name of the object and it has no impact to DNS resolution. Below I show 3 steps:

 

1. Lookup the fixed address 172.16.4.4, to retrieve the object reference (_ref).

 

$ curl -k -u admin:infoblox -X GET 'https://192.168.2.51/wapi/v2.10.5/fixedaddress?ipv4addr=172.16.4.4'
[
    {
        "_ref": "fixedaddress/ZG5zLmZpeGVkX2FkZHJlc3MkMTcyLjE2LjQuNC4wLi4:172.16.4.4/default", 
        "ipv4addr": "172.16.4.4", 
        "network_view": "default"
    }
]

 

2. Use the object reference to perform an update, changing 'name' to "NameTwo".

 

$ curl -k -u admin:infoblox -H 'Content-Type:application/json' \
-X PUT
'https://192.168.2.51/wapi/v2.10.5/fieGVkX2FkZHJlc3MkMTcyLjE2LjQuNC4wLi4:172.16.4.4/default' \ 
--data '{"name":"NameTwo"}'

 

 

3. Lookup the fixed address 172.16.4.4 again with _ref to verify the 'name' field has changed. 

 

$ curl -k -u admin:infoblox -X GET 'https://192.168.2.51/wapi/v2.10.5/fixedaddress?ipv4addr=172.16.4.4&_return_fields%2B=name'
[
    {
        "_ref": "fixedaddress/ZG5zLmZpeGVkX2FkZHJlc3MkMTcyLjE2LjQuNC4wLi4:172.16.4.4/default", 
        "ipv4addr": "172.16.4.4", 
        "name": "NameTwo", 
        "network_view": "default"
    }
]

 

Re: Update Name attribute for a fixed address using infoblox API

New Member
Posts: 3
5119     0

Thaks heaps for this works like a charm Smiley Happy

Showing results for 
Search instead for 
Did you mean: 

Recommended for You