- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Update Name attribute for a fixed address using infoblox API
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2020 08:44 PM
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?
Solved! Go to Solution.
Re: Update Name attribute for a fixed address using infoblox API
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2020 11:26 PM
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2020 04:24 AM
Thaks heaps for this works like a charm