Create a Host for an Inventory Source

delete

/api/v2/inventory_sources/{id}/hosts/

Make a POST request to this resource with the following host fields to create a new host associated with this inventory source.

  • 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=``)

Delete all hosts of this Inventory Source:

Make a DELETE request to this resource to delete all hosts show in the list. The Inventory Source will not be deleted by this request.

Request

Supported Media Types
Path Parameters
Back to Top

Response

Supported Media Types

204 Response

Back to Top