Reply

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

Techie
Posts: 10
568     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: 10
569     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