Update a Host
patch
/api/v2/hosts/{id}/
Make a PUT or PATCH request to this resource to update this host. The following fields may be modified:
name
: Name of this host. (string, required)description
: Optional description of this host. (string, default=""
)inventory
: (id, required)enabled
: Is this host online and available for running jobs? (boolean, default=True
)instance_id
: The value used by the remote inventory source to uniquely identify the host (string, default=""
)variables
: Host variables in JSON or YAML format. (json, default=``)
For a PATCH request, include only the fields that are being modified.
Request
Supported Media Types
- application/json
Path Parameters
Root Schema : Host
Type:
Show Source
object
-
ansible_facts_modified:
string(date-time)
Title:
Ansible facts modified
Read Only:true
The date and time ansible_facts was last modified. -
created:
string
Title:
Created
Read Only:true
-
description:
string
Title:
Description
-
enabled:
boolean
Title:
Enabled
Default Value:true
Is this host online and available for running jobs? -
has_active_failures:
string
Title:
Has active failures
Read Only:true
-
has_inventory_sources:
string
Title:
Has inventory sources
Read Only:true
-
id:
integer
Title:
ID
Read Only:true
-
instance_id:
string
Title:
Instance id
Maximum Length:1024
The value used by the remote inventory source to uniquely identify the host -
inventory(required):
integer
Title:
Inventory
-
last_job:
string
Title:
Last job
Read Only:true
-
last_job_host_summary:
integer
Title:
Last job host summary
Read Only:true
-
modified:
string
Title:
Modified
Read Only:true
-
name(required):
string
Title:
Name
Minimum Length:1
Maximum Length:512
- related: string
-
summary_fields:
string
Title:
Summary fields
Read Only:true
-
type:
string
Title:
Type
Read Only:true
-
url:
string
Title:
Url
Read Only:true
-
variables:
string
Title:
Variables
Host variables in JSON or YAML format.
Response
Supported Media Types
- application/json
200 Response
Root Schema : Host
Type:
Show Source
object
-
ansible_facts_modified:
string(date-time)
Title:
Ansible facts modified
Read Only:true
The date and time ansible_facts was last modified. -
created:
string
Title:
Created
Read Only:true
-
description:
string
Title:
Description
-
enabled:
boolean
Title:
Enabled
Default Value:true
Is this host online and available for running jobs? -
has_active_failures:
string
Title:
Has active failures
Read Only:true
-
has_inventory_sources:
string
Title:
Has inventory sources
Read Only:true
-
id:
integer
Title:
ID
Read Only:true
-
instance_id:
string
Title:
Instance id
Maximum Length:1024
The value used by the remote inventory source to uniquely identify the host -
inventory(required):
integer
Title:
Inventory
-
last_job:
string
Title:
Last job
Read Only:true
-
last_job_host_summary:
integer
Title:
Last job host summary
Read Only:true
-
modified:
string
Title:
Modified
Read Only:true
-
name(required):
string
Title:
Name
Minimum Length:1
Maximum Length:512
- related: string
-
summary_fields:
string
Title:
Summary fields
Read Only:true
-
type:
string
Title:
Type
Read Only:true
-
url:
string
Title:
Url
Read Only:true
-
variables:
string
Title:
Variables
Host variables in JSON or YAML format.