07-13-2016 09:12 AM
Current env: IB v6.12.11, no NetMRI
1) Best practice for Host/A record deletion via WAPI?
2) Best/easiest/quickest way to roll-back after it is determined record was deleted in error?
We have a currently manual process for deleting some of our legacy application environments. A list of servers is created, and their associated Host/A records are provided in a spreadsheet. We have some code where we copy/paste the FQDN server names from the spreadsheet into a web form. We can then parse the list, and make WAPI REST calls to IB to view/delete the records... well, that's the plan! Our DNS/IPAM administrators would be performing the deletions in the web form, although in the future, this task might be delegated to lower-level techs.
Rather than delete the records directly with REST calls, would it be a better approach to use a REST call to create a Task containing a list of the records, and have an Approval workflow associated with that Task?
We can certainly have our self-service web portal page enable the user to review the records to be deleted, and automate that process. However, is that the best approach?
Would it be better--or even possible--to make a WAPI call to create a Task for this, and let the review and approval of the task take place in the IB admin console by our company's DNS/IPAM administrators?
This Task could be scheduled to perform the deletion during the after-hours change window.
One concern I have it how to best roll-back after a deletion. Is this something that would be possible, and perhaps easier to do from the admin console, if the Task had been used to perform the record deletion that needs to be roll-back?
Or, if we deleted the record from the self-service web portal via a WAPI call, how best to rollback? Should we create a CSV export file for each delete operation?
Any suggestions would be welcome.
Solved! Go to Solution.
07-13-2016 12:14 PM
If you upgrade to 7x you can use CSV import to delete records. Since you're starting with a spreadsheet, this is the logical direction to take.
Either way, yes, workflow and approvals is the best option. The workflow is all managed by the admin groups, so there is nothing special you need to do on the API/portal side. It just comes down to the login ID and this rule:
Changes by admins in Group-A need to be approved by admins in Group-B
You can then add some scheduling params to the WAPI call (e.g : make this change at zero-dark-thirty + 7 days) and even if the task is approved, it will then hang in the queue untul the scheduled time.
Roll-back is tricky, your only option is the recycle bin, and that is probably going to be done via the GUI.
The other option is to not delete the record, but just disable it. But then you have to do garbage collection later, or the address/name will continue to be marked as "in use"
07-13-2016 07:23 PM
Thanks so much! That was super-helpful!
Once my teammate and I have this working on our web portal, I'll create a new post to show you all.
05-21-2019 08:26 AM
Hi I have a requirement to delete a host record. To accomplish that I have to first get the object reference for the host name object and then pass it in delete. But when I try to run the below URL in postman(In postman to test my string) but getting a blank value as a result set.
06-23-2019 12:30 PM