SSO Login is being implemented on this site. Existing users: Your existing password must be reset the first time you login using SSO. Click here to reset your password first before login. Your new username will be your email.

API & Integration, DevOps,NetOps,SecOps


Add a host record to multiple DNS views with API?

Posts: 1
1160     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: 10
1160     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