---
title: "NIOS Lookup"
canonical: "https://docs.infoblox.com/space/niosmodulesansible/46006339/NIOS%20Lookup"
format: markdown
---
Use the `nios_lookup` plug-in to fetch NIOS specified objects. The plug-in uses Infoblox WAPI to fetch the objects. You can filter the returned data by adding keywords. You can also specify the set of fields that must be returned.

The following table describes the parameters you can define in the `nios_lookup plug-in`:

| **Parameter** | **Required/Optional** | **Description** |
| --- | --- | --- |
| `terms` | Required | The name of the network object that must be returned from the NIOS appliance. |
| `return_fields` | Required | The list of field names to return for the specified object. |
| `filter` | Required | A dictionary object that is used to filter the returned objects. |
| `extattrs` | Optional | A dictionary object that is used to filter the returned objects according to extensible attributes. |
| `provider` | Required | <span style="color: #000000">Defines the details of the connection:</span><br>- `host`: The DNS host name or IP address to connect to the remote instance of NIOS.
- `username`: The user name to use to authenticate the connection to the remote instance.
- `password`: The password to use to authenticate the connection to the remote instance.<br>For information on additional fields you can define, see <span style="color: #172b4d">the list of subparameters in the </span><span style="color: #172b4d">*[NIOS Modules for Ansible Collections](https://infoblox-docs.atlassian.net/wiki/spaces/niosmodulesansible/pages/44525470)*</span><span style="color: #172b4d"> topic.</span> |
| `connection` | Required | The `nios_lookup` module must be run locally. |

## <span style="color: #000000">Examples</span>

`name: fetch all networkview objects`  
`ansible.builtin.set_fact:`  
`  networkviews: "{{ lookup('infoblox.nios_modules.nios_lookup', 'networkview', provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}"`  


`name: fetch the default dns view`  
`ansible.builtin.set_fact:`  
`  dns_views: "{{ lookup('infoblox.nios_modules.nios_lookup', 'view', filter={'name': 'default'},`  
`provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}"`