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

Reply

How do you remove an Aliase from a Host record using the WAPI?

Techie
Posts: 3
1410     0

I am trying to remove a Aliase from a host record and am having a very difficult time - Idealy I would use the Ansible plug in but it seems to only allow you at add aliases so I am now trying direcly via WAPI

 

I am using the following curl command:

 

curl -k1 -u <uid> -X POST https://<hostname>/wapi/v2.10.5/record:host/ZG5zLmhvc3QkLjQuZWR1LmNvbHVtYmlhLmN1aXQudGVzdC50ZXN0ZXIwMQ:tester01.test.com/External%20DNS -H "Content-Type: application/json" -d '{"name": "tester01.test.com", "ipv4addrs":[{"ipv4addr":"172.16.1.33"}], "view" : "External DNS", "aliases": []}'

I get the error:

{ "Error": "AdmConDataError: None (IBDataConflictError: IB.Data.Conflict:The record 'tester01.test.com' already exists.)", 
  "code": "Client.Ibap.Data.Conflict", 
  "text": "The record 'tester01.test.com' already exists."
}%    

Re: How do you remove an Aliase from a Host record using the WAPI?

Techie
Posts: 3
1411     0

I think I figured it out - needed to use PUT and not POST

Showing results for 
Search instead for 
Did you mean: 

Recommended for You