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

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

Techie
Posts: 3
2835     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
2836     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