- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
unexpected result with a fqdn search
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2021 01:42 PM
I'm not sure why, but when I attempt the search api with fqdn:=myhost.mydomain.org, it returns an empty list. When I attempt this search with fqdn:=myhost, it properly returns myhost.mydomain.org
Here are two samples with sensitive information substituted for something generic. This should however showcase my experience though:
Request with FQDN:
Request: https://infoblox.mydomain.org/wapi/v2.10/search?fqdn:=myhost.mydomain.org
Result: empty list
Request with just hostname:
Request: https://infoblox.mydomain.org/wapi/v2.10/search?fqdn:=myhost
Result:
<list>
<value type="object">
<name>myhost.mydomain.org</name>
<ipv4addrs>
<list>
<value type="object">
<configure_for_dhcp type="boolean">false</configure_for_dhcp>
<host>myhost.mydomain.org</host>
<ipv4addr>10.11.12.13</ipv4addr>
<_ref>record:host_ipv4addr/ZG5zLmhvc3RfYWRkcmVzcyQuX2RlZmF1bHQuY29tLmJtYy5waHgtYW9xYS0wNC4xNzIuMjQuMzcuMTU0Lg:10.11.12.13/myhost.mydomain.org/default</_ref>
</value>
</list>
</ipv4addrs>
<_ref>record:host/ZG5zLmhvc3QkLl9kZWZhdWx0LmNvbS5ibWMucGh4LWFvcWEtMDQ:myhost.mydomain.org/default</_ref>
<view>default</view>
</value>
</list>
Re: unexpected result with a fqdn search
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2021 07:15 AM
Hi,
You are right. This is quite strange. I tried the following API calls and it looks fine on my end.
With full name:
https://grid-master.demo.com/wapi/v2.10/search?fqdn:=test.demo.com Output: [ { "_ref": "record:host/ZG5zLmhvc3QkLl9kZWZhdWx0LmNvbS5kZW1vLnRlc3QuaG9zdA:host.test.demo.com/default", "ipv4addrs": [ { "_ref": "record:host_ipv4addr/ZG5zLmhvc3RfYWRkcmVzcyQuX2RlZmF1bHQuY29tLmRlbW8udGVzdC5ob3N0LjE3Mi4wLjAuMTAu:172.0.0.10/host.test.demo.com/default", "configure_for_dhcp": false, "host": "host.test.demo.com", "ipv4addr": "172.0.0.10" } ], "name": "host.test.demo.com", "view": "default" }, { "_ref": "zone_auth/ZG5zLnpvbmUkLl9kZWZhdWx0LmNvbS5kZW1vLnRlc3Q:test.demo.com/default", "fqdn": "test.demo.com", "view": "default" } ]
With the first part of the name:
https://grid-master.demo.com/wapi/v2.10/search?fqdn:=test Output: [ { "_ref": "record:host/ZG5zLmhvc3QkLl9kZWZhdWx0LmNvbS5kZW1vLnRlc3QuaG9zdA:host.test.demo.com/default", "ipv4addrs": [ { "_ref": "record:host_ipv4addr/ZG5zLmhvc3RfYWRkcmVzcyQuX2RlZmF1bHQuY29tLmRlbW8udGVzdC5ob3N0LjE3Mi4wLjAuMTAu:172.0.0.10/host.test.demo.com/default", "configure_for_dhcp": false, "host": "host.test.demo.com", "ipv4addr": "172.0.0.10" } ], "name": "host.test.demo.com", "view": "default" }, { "_ref": "zone_auth/ZG5zLnpvbmUkLl9kZWZhdWx0LmNvbS5kZW1vLnRlc3Q:test.demo.com/default", "fqdn": "test.demo.com", "view": "default" } ]
I would suggest opening a support ticket to help debug further.
Regards,
Krishna Vasudevan
Re: unexpected result with a fqdn search
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2021 07:43 AM
I noticed something else strange. According to the WAPI Documentation (/wapidoc/objects/search.html):
FQDN is used as the search criterion.
Type
String.
Search
The field is available for search via
- ‘:=’ (case insensitive search)
- ‘=’ (exact equality)
- ‘~=’ (regular expression)
Notes
fqdn is a search-only field.
However, when I invoke the fqdn search with the exact equality, it tells me:
{ "Error": "AdmConProtoError: The exact search is not supported for the fqdn field.", "code": "Client.Ibap.Proto", "text": "The exact search is not supported for the fqdn field." }
Re: unexpected result with a fqdn search
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2021 01:35 AM
Thank you for posting that it could be just the thing to give inspiration to someone who needs it! Keep up the great work!