RHV REST API curl command errors with "Unauthorized" message

Solution Verified - Updated -

Issue

  • RHV API curl command returns an error:
curl -X GET -H "Accept: application/xml" -u admin:your_password --insecure https://rhv4.example.com:443/ovirt-engine/api/vms
<html><head><title>Error</title></head><body>Unauthorized</body></html>

Environment

  • Red Hat Virtualization (RHV) 4.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content