Inventory sources
While the functionality of each integration will remain the same regardless of how the inventory device is sourced (internal or external), it is important to understand how Itential Automation Gateway (IAG) will behave in each scenario.
Internal inventory
An Internal inventory source simply means that an External file path was not supplied, or not correctly loaded; therefore, you must manage your inventory exclusively through the GUI or APIs.
External inventory
An External inventory source indicates that you have provided the correct file path to the relevant inventory or configuration file for your integration. Because the external file serves as the source of truth, IAG cannot directly modify it, and the Internal inventory option is disabled. To update an External inventory, you must edit the file directly and then prompt IAG to refresh its inventory data.
Refresh external inventories
After modifying an external inventory file, refresh the inventory in IAG using one of the following methods:
Refresh endpoint
Refresh the inventory by calling the refresh endpoint: POST /inventory/refresh.
- Example request URL:
http://<iag-hostname>:8083/api/v2.0/inventory/refresh
Replace <iag-hostname> with your IAG hostname or IP address.
- Example response:
For more information, see Viewing endpoints and methods.
Refresh from UI
Refresh the inventory from the IAG UI by selecting the Devices refresh icon.
.png)
Ansible and inventory devices
For legacy support, among other factors, IAG has two sets of endpoints for inventory. The first are the /devices and /groups endpoints, which are exclusively for use with Ansible (and Scripts by extension). The second is the /inventories endpoints, which are for all inventory-enabled integrations besides Ansible. In either case, you can manage inventory devices via the GUI or RESTful API endpoints.
Beginning with IAG 2021.1, Ansible will be the only integration that uses the /devices endpoint.
Inventory device integration types
Each Inventory Device has an associated integration_type which is used when managing devices via API calls.
See also: Inventory integration variables.