Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
How do you remove an Aliase from a Host record using the WAPI?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2020 11:57 AM
2836     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." }%
Labels:
Re: How do you remove an Aliase from a Host record using the WAPI?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2020 12:30 PM
2836     0
I think I figured it out - needed to use PUT and not POST