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 Examples

Reply

How to search for all instances of FQDN and remove using one API call

Authority
Posts: 11
270     0

This seems as though it should be fairly straight forward but I'm not figuring it out.  Running NIOS version 8.6.x and have WAPI version 2.12.2

My goal is to search for any records (arecords,ptr,cname,host) that have test.example.com and remove.

We have thousands of requests to decomm a server in infoblox which all we are provided with is the FQDN and you don't know if its an a-record, ptr-record, cname or host record.

Can we do a multi body object that seeks all records matching test.example.com and destroy?

I attempted to follow the suggestions found here (https://blogs.infoblox.com/community/consolidate-your-wapis-using-the-request-object/) but I am not successful.

I have downloaded the WAPI examples to postman and I don't see any examples of the multi body object.  It seems as though this would be a pretty common task but again I am unable to find anything online that works.

 

PLEASE help me identify and delete any record that contains test.example.com (as an example)

Re: How to search for all instances of FQDN and remove using one API call

Member
Posts: 2
271     0
The challenge here is that although you can do a specific search and delete for one object using the request object, there is no way to iterate through the references for multiple objects. Therefore it is simpler to break this in to two or more calls. The first call would be a using either the records or search (global) for the records. The returned results then need to be iterated to find all the object references (_ref) and object types for the returned objects. You could then build a request made of multiple DELETE items (one for each object type and _ref) or as you iterate the results perform individual calls to delete. If you really needed to do this in a single call then you have to create a request body that performs a search for each object type followed by a delete call. Followed by a search for the next object type, etc. (ie. a GET and DELETE for each object type). There are plenty of examples of the syntax for deletes for a specific object type in this postman collection (not sure if it is the one you are using): https://github.com/Infoblox-WWFO/nios_postman But if there are any questions let me know and hope this helps.
Showing results for 
Search instead for 
Did you mean: 

Recommended for You

Businesses are investing heavily into securing company resources from cyber-attacks form cybercrimin