3.7. Example: Approve Host

The hypervisor host resource contains an approve action. A user accesses this action's URI with a POST request.

Example 3.7. Approve a pre-configured Red Hat Enterprise Virtualization Hypervisor host

Request:

POST /api/hosts/0656f432-923a-11e0-ad20-5254004ac988/approve HTTP/1.1
Accept: application/xml
Content-type: application/xml

<action/>

cURL command:

# curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" \
    -u [USER:PASS] --cacert [CERT] \
    -d "<action/>" \
    https://[RHEVM Host]:443/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/approve

The POST request requires a body for the message entities to initiate an action. Since the action does not require additional parameters, the body contains an empty action element.
Use the approve action only for Red Hat Enterprise Virtualization Hypervisor hosts. Red Hat Enterprise Linux hosts require a different process to connect to the virtualization environment.
This approves and activates the host for use in your virtual environment. The status for hypervisor changes from non_operational to up.