`Host_filter` Is Available on This Endpoint. The Filter Supports: Relational Queries, `And` `Or` Boolean Logic, as Well as Expression Grouping via `()`.
post
/api/v2/hosts/
?host_filter=name=my_host
?host_filter=name="my host" or name=my_host
?host_filter=groups__name="my group"
?host_filter=name=my_host and groups__name="my group"
?host_filter=name=my_host and groups__name="my group"
?host_filter=(name=my_host and groups__name="my group") or (name=my_host2 and groups__name=my_group2)
host_filter
can also be used to query JSON data in the related ansible_facts
. __
may be used to traverse JSON dictionaries. []
may be used to traverse JSON arrays.
?host_filter=ansible_facts__ansible_processor_vcpus=8
?host_filter=ansible_facts__ansible_processor_vcpus=8 and name="my_host" and ansible_facts__ansible_lo__ipv6[]__scope=host
Request
Supported Media Types
- application/json
Root Schema : schema
Type:
Show Source
object
-
description(optional):
string
-
enabled(optional):
boolean
Is this host online and available for running jobs?
-
instance_id(optional):
string
The value used by the remote inventory source to uniquely identify the host
-
inventory:
integer
-
name:
string
-
variables(optional):
string
Host variables in JSON or YAML format.