Hosts Create
post
/api/v2/hosts/
host_filter is available on this endpoint. The filter supports: relational queries, and or boolean logic, as well as expression grouping via ().
?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 : Host
Type:
Show Source
object-
ansible_facts_modified:
string(date-time)
Title:
Ansible facts modifiedRead Only:trueThe date and time ansible_facts was last modified. -
created:
string
Title:
CreatedRead Only:true -
description:
string
Title:
Description -
enabled:
boolean
Title:
EnabledDefault Value:trueIs this host online and available for running jobs? -
has_active_failures:
string
Title:
Has active failuresRead Only:true -
has_inventory_sources:
string
Title:
Has inventory sourcesRead Only:true -
id:
integer
Title:
IDRead Only:true -
instance_id:
string
Title:
Instance idMaximum Length:1024The value used by the remote inventory source to uniquely identify the host -
inventory(required):
integer
Title:
Inventory -
last_job:
string
Title:
Last jobRead Only:true -
last_job_host_summary:
integer
Title:
Last job host summaryRead Only:true -
modified:
string
Title:
ModifiedRead Only:true -
name(required):
string
Title:
NameMinimum Length:1Maximum Length:512 - related: string
-
summary_fields:
string
Title:
Summary fieldsRead Only:true -
type:
string
Title:
TypeRead Only:true -
url:
string
Title:
UrlRead Only:true -
variables:
string
Title:
VariablesHost variables in JSON or YAML format.
Response
Supported Media Types
- application/json
201 Response
Root Schema : Host
Type:
Show Source
object-
ansible_facts_modified:
string(date-time)
Title:
Ansible facts modifiedRead Only:trueThe date and time ansible_facts was last modified. -
created:
string
Title:
CreatedRead Only:true -
description:
string
Title:
Description -
enabled:
boolean
Title:
EnabledDefault Value:trueIs this host online and available for running jobs? -
has_active_failures:
string
Title:
Has active failuresRead Only:true -
has_inventory_sources:
string
Title:
Has inventory sourcesRead Only:true -
id:
integer
Title:
IDRead Only:true -
instance_id:
string
Title:
Instance idMaximum Length:1024The value used by the remote inventory source to uniquely identify the host -
inventory(required):
integer
Title:
Inventory -
last_job:
string
Title:
Last jobRead Only:true -
last_job_host_summary:
integer
Title:
Last job host summaryRead Only:true -
modified:
string
Title:
ModifiedRead Only:true -
name(required):
string
Title:
NameMinimum Length:1Maximum Length:512 - related: string
-
summary_fields:
string
Title:
Summary fieldsRead Only:true -
type:
string
Title:
TypeRead Only:true -
url:
string
Title:
UrlRead Only:true -
variables:
string
Title:
VariablesHost variables in JSON or YAML format.