Overview
Inventories are collections of hosts that can be targeted by Ansible playbooks. AWX supports regular inventories, smart inventories (dynamic host filtering), and constructed inventories.Endpoints
List Inventories
Create Inventory
Standard Inventory
Smart Inventory
string
required
Inventory name
string
Inventory description
integer
required
Organization ID
string
default:""
Inventory type: “ (regular),
smart, or constructedstring
Smart inventory host filter (required for smart inventories)
string
Inventory variables in YAML or JSON format
boolean
default:"false"
Prevent falling back to default instance group
Retrieve Inventory
Response Schema
integer
Inventory ID
string
Inventory name
string
Inventory description
integer
Organization ID
string
Inventory kind: “,
smart, or constructedstring
Smart inventory filter
string
Inventory-level variables
boolean
Whether any hosts have active failures
integer
Total number of hosts
integer
Number of hosts with failures
integer
Total number of groups
boolean
Whether inventory has sources
integer
Number of inventory sources
integer
Number of failed sources
boolean
Whether inventory is pending deletion
Links to related resources:
hosts- Inventory hostsgroups- Inventory groupsroot_groups- Top-level groupsvariable_data- All variablesscript- Dynamic inventory scripttree- Inventory tree viewinventory_sources- Inventory sourcesupdate_inventory_sources- Trigger source updatesactivity_stream- Activity logjob_templates- Job templates using this inventoryad_hoc_commands- Ad hoc commandsaccess_list- Access listobject_roles- Available rolesinstance_groups- Instance groupslabels- Inventory labelscopy- Copy endpointinput_inventories- Input inventories (constructed only)
Update Inventory
Delete Inventory
Inventory Hosts
List Hosts
Add Host
Inventory Groups
List Groups
Create Group
Inventory Sources
List Inventory Sources
Create Inventory Source
Update All Inventory Sources
Inventory Script
Get dynamic inventory script output:Inventory Tree
Get hierarchical tree view:Variable Data
Get all inventory variables (inventory + group + host):Ad Hoc Commands
Job Templates
List job templates using this inventory:Labels
Instance Groups
Object Roles
- admin_role - Full inventory administration
- use_role - Use inventory in job templates
- update_role - Trigger inventory source updates
- adhoc_role - Run ad hoc commands
- read_role - View inventory details