14.5. Methods
14.5.1. Creating a Host
Creation of a new host requires the
name, address and root_password elements.
Example 14.5. Creating a host
POST /api/hosts HTTP/1.1
Accept: application/xml
Content-type: application/xml
<host>
<name>host2</name>
<address>host2.example.com</address>
<root_password>p@55w0Rd!</root_password>
</host>
New host creation applies only to the addition of Red Hat Enterprise Linux hosts. Red Had Enterprise Virtualization Manager detects hypervisor hosts automatically and requires approval for their use.
The
root_password element is only included in the client-provided initial representation and is not exposed in the representations returned from subsequent requests.