Are you interested in our Early Access Program (EAP)? This program allows you to preview code, test in your lab and provide feedback prior to General Availability (GA) release of all Infoblox products. If so, please click the link here.

API & Integration, DevOps,NetOps,SecOps


Add a host record to multiple DNS views with API?

Posts: 1
2121     0

For our external-facing web servers, we typically put them in both our external and internal DNS views using the web interface. I'm trying to script this process using the REST API, and running into a problem: I can add a host record to the first view, but when I try to to add the second record in the other view, I get an error, " (400) Bad Request".


I'm scripting this in PowerShell using

-Uri "https://<address>/wapi/v2.5record:host"
-Method Post
-Body '{ "ipv4addrs": [ { "ipv4addr": "<ipaddr>", "mac": "<macaddr>" }], "name": "<fqdn>" , "view": "external" }'
-ContentType "application/json"
-Credential $c

It doesn't matter which view I enter first, "internal" or "external". The second one always fails because a host record already exists in the other view.


What am I missing?

Re: Add a host record to multiple DNS views with API?

Posts: 11
2122     0

The mac address in both records is causing the conflict because Infoblox is creating a DHCP reservation for that mac under the hood. You can either remove the mac from one copy of the record or explicitly specify the "configure_for_dhcp" field to "false" in one or both of them.


Showing results for 
Search instead for 
Did you mean: 

Recommended for You