- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
How to search with WAPI for hostnames(including canonnical names in cname) regardless the recordtype
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-11-2017 02:29 AM - edited 04-11-2017 02:31 AM
Hi,
I'm looking for a solution via the WAPI for the following.
We receive deletion request where there requester only defines the hostname.
With that hostname I need to find all DNS records related to that host, including:
- A records
- HOST records
- PTR records
- CNAMEs having the hostname in the CNAME
- CNAMEs pointing to the given hostname (so the cannonical name in Infoblox), regardless the CNAME-name.
As far as I know the WAPI search function requires the recordtype to be defined, so for example:
curl -k1 -s -u <user> -X GET https://<infobloxgui>/wapi/<apiversion>/record:a?name~=<hostname> for an A record or:
curl -k1 -s -u <user> -X GET https://<infobloxgui>/wapi/<apiversion>/record:cname?name~=<hostname> for a cname.
My questions are:
1) Is it possibile to search with the WAPI the database for a hostname regardless the recordtype so it will search in any record type? (so one query for all in stead of separate queries for each recordtype)?
2) How to search with the WAPI for a CNAME by Canonnical Name.
So for example: Lets say a CNAME named 'cname1' points to 'destination1'
How to search for 'destination1' using the WAPI so it will find 'cname1'?
Thanks in advance for your help/
Re: How to search with WAPI for hostnames(including canonnical names in cname) regardless the record
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-24-2017 10:59 AM
Hi,
1. You can use "allrecords" to retreive all records for a zone.
2. Use "canonical"
BR,
Vadim
Re: How to search with WAPI for hostnames(including canonnical names in cname) regardless the record
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-01-2017 05:15 AM
Is there a to expand the search to include all zones in a view?
Re: How to search with WAPI for hostnames(including canonnical names in cname) regardless the record
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-03-2017 01:39 PM
@ton10291 wrote:
Is there a to expand the search to include all zones in a view?
By default it search in all zones but if you define name it includes a zone. If you a lloking just for a specific hostname w/o a zone, you can use regex e.g.
/wapi/v2.6/record:a?name~=.*tme.*
Re: How to search with WAPI for hostnames(including canonnical names in cname) regardless the record
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-14-2018 10:42 AM
A more helpful response might be:
https://<servername>/wapi/<version>/record:cname?canonical=<fqdn>