Allow non-privileged users to use the API

Hi, I'm currently trying to use oVirt's API with a non-privileged username (only has UserRole over a few VMs) and when the request is made, a 400 error is returned: <fault> <reason>Operation Failed</reason> <detail> query execution failed due to insufficient permissions. </detail> </fault> Is there a way to grant non-privileged users the ability to use API (for example, to list VMs where they have privileges)? What's the minimal permission a username needs to be granted to use the API? Thanks. Nicolás

On Wednesday, June 08, 2016 01:27:48 PM nicolas@devels.es wrote:
Hi,
I'm currently trying to use oVirt's API with a non-privileged username (only has UserRole over a few VMs) and when the request is made, a 400 error is returned:
<fault> <reason>Operation Failed</reason> <detail> query execution failed due to insufficient permissions. </detail> </fault>
Is there a way to grant non-privileged users the ability to use API (for example, to list VMs where they have privileges)? What's the minimal permission a username needs to be granted to use the API?
Thanks.
Nicolás _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
I don't know which SDK you are using or if you are doing direct http requests with your own framework, but in order for non privileged users to use the REST api you need to pass the 'filter: true' header with the request. This will tell the REST api to filter the results based on the users permissions.

El 2016-06-08 13:43, Alexander Wels escribió:
On Wednesday, June 08, 2016 01:27:48 PM nicolas@devels.es wrote:
Hi,
I'm currently trying to use oVirt's API with a non-privileged username (only has UserRole over a few VMs) and when the request is made, a 400 error is returned:
<fault> <reason>Operation Failed</reason> <detail> query execution failed due to insufficient permissions. </detail> </fault>
Is there a way to grant non-privileged users the ability to use API (for example, to list VMs where they have privileges)? What's the minimal permission a username needs to be granted to use the API?
Thanks.
Nicolás _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
I don't know which SDK you are using or if you are doing direct http requests with your own framework, but in order for non privileged users to use the REST api you need to pass the 'filter: true' header with the request. This will tell the REST api to filter the results based on the users permissions.
Thanks, that worked. Regards.
participants (2)
-
Alexander Wels
-
nicolas@devels.es