Reply

Search Alias embedded in Host Object.

Techie
Posts: 5
7026     1

How can I get the Host Object by passing Alias which is created in that Host Object.

e.g : for object 4.0.64.8 a host object is created with host name: btest061616-1.eds.com, as shown in file: Host Object Details.PNG
two aliases are added to this object as shown in file: Alias in Host Obj.PNG

In my code I want to pass any of the Alias and fetch the details of this Host object. I am using curl command in PHP code for talking to infoblox system.

- Thanking in advance...

Re: Search Alias embedded in Host Object.

Adviser
Posts: 63
7026     1

As far as I can tell, you can't.

 

It is stated in the DNS Host record object reference that the aliases field is not searchable.

 

Please see WAPI docs at https://<your_appliance_ip>/wapidoc/objects/record.host.html for more details.

Re: Search Alias embedded in Host Object.

Techie
Posts: 5
7026     1
 
Hello ABodart,

I had read the same thing in my guide also. But then I am able to search the aliases on Infoblox Gridmaster. This means Infoblox does have capability to seach an alias, even if it is embedded in Host Object.
I failed to get hold of it in initial attempts but then I tried passing only Alias:

curl -k3 -u userSmiley Tongueassword -X GET https://<Appliance url>/record:host \-d alias='<AliasName>'
This way I am able to get the Host object having this Alias, but since it doe not working when passing view the host objects will be returned under all the views.
 

Re: Search Alias embedded in Host Object.

Adviser
Posts: 63
7027     1

Interresting, thanks !

 

The docs should be updated I guess.

Re: Search Alias embedded in Host Object.

Techie
Posts: 7
7027     1

Here's how I did it in Infoblox v6.12

 

https://<Appliance url>/wapi/v1.7.3/record:host?alias=testalias.domain.net

 

This call doesn't return a list of any other Aliases that might exist on the object--only the bare minimun informational fields about the Host object.

 

To get the full info on the Host record you've found, you'd need to use the _ref from the first call, and make another API call to fetch the Host record.  Something like this:

 

https://<Appliance url>/wapi/v1.7.3/record:host/ZG5zLmhvc3QkLlxkZWZhdWx0L15ldC5oY3NjfW50LmFwcC5lY2hpZGZsdC1vbmx5LWhvc3QtMDE:testhost.domain.net/default?_return_fields%2B=aliases,comment,disable,extattrs,zone

 

Enjoy!

 

Tim

 

Re: Search Alias embedded in Host Object.

Community Manager
Community Manager
Posts: 248
7027     1

Try this

 

https://<Appliance url>/wapi/v1.7.3/record:host?alias=testalias.domain.net&_return_fields%2B=aliases,comment,disable,extattrs,zone,view
Showing results for 
Search instead for 
Did you mean: 

Recommended for You