[Users] Authentication for REST APIs?

Yair Zaslavsky yzaslavs at redhat.com
Tue Oct 2 03:49:08 UTC 2012


Hi Brian,
I looked at the wiki -
I assume you're referring to the "showVm" part.
Have you assigned any permissions to the user that is supposed to view 
the VMs?
I assume you created the VMs with the administrator user, so any other 
user will require to have a proper permissions in order to view these VMs

Yair


On 10/02/2012 05:09 AM, Brian Vetter wrote:
> I was trying to use both the rest api to view a user's vm information. I found that the REST APIs always returned an authentication error if the account I had logged into was not an ovirt administrator. I am guessing that either (a) I am using the wrong URL in the REST api or (b) you must be some kind of admin to access the REST APIs. I noticed the same behavior when I was using the ovirt-shell tool.
>
> For example, I was trying to follow the instructions in http://wiki.ovirt.org/wiki/How_to_Connect_to_SPICE_Console_Without_Portal to get the list of VMs (presumably for the user that is logging in), I get an unauthorized error. If the user account I login with in the curl or ovirt-shell connect statement is an admin, I get the list of VMs.
>
> So my question here is does the REST-API need admin privileges or am I using a url that requires admin privileges whereas some others don't. And if it is the latter, is there somewhere that documents the various rest api resources? For example, to go back to the "How to connect to Spice console ..." article, how would one use the REST API to fetch one's virtual machines, their status, and connection info for them?
>
> Thanks,
>
> Brian
>
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>



More information about the Users mailing list