Ovirt Tips

oVirt 4.2.x API Must Knows

248 views March 31, 2018 zipadmin 2

I have worked a lot with the REST API recently, and some of these took me a while to find:

  1. You can connect to the API Docs on your Web UI using:
    https://FQDNofENGINE/ovirt-engine/apidoc/
  2. If you connect to your WebUI API using

    https://FQDNofENGINE/ovirt-engine/api/

    Then view the source of your browser and you should see the XML. The XML should also be clickable to navigate all of the levels of the API with your data.

  3. RHEL Guide to the API almost all applies to the oVirt 4.2.x REST API.

    https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.1/pdf/rest_api_guide/Red_Hat_Virtualization-4.1-REST_API_Guide-en-US.pdf

  4. There are some API changes in oVirt 4.2.x. The best way I have found to expose them is to pass invalid params to the API and then do a
    tail /var/log/ovirt-*/*.log -f

    on the Engine VM and watch for the errors. The error will show you the invalid params as well as list all of the valid params that can be passed.

  5. Highly recommend installing the REST API plugin for your browser. It makes testing the API much easier.

    http://restclient.net/

 

Was this helpful?