Bug 1212483

Summary: Adding HTTP header "filter : true" fails the result of /api/vms?search={query}
Product: [Retired] oVirt Reporter: Ali Tokhmpash <alikbm>
Component: ovirt-engine-apiAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED DUPLICATE QA Contact: Pavel Stehlik <pstehlik>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.5CC: alikbm, ecohen, gklein, lsurette, rbalakri, yeylon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-16 13:44:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ali Tokhmpash 2015-04-16 13:39:19 UTC
Description of problem:

Adding the "filter:true" to HTTP request for non-admin user for REST API and requesting a specific vm by using /api/vms?search={query} returns wrong result, instead of that specific vm you get all vms on oVirt.

However search works fine using admin user where you don't need to send filter:true header. 


Version-Release number of selected component (if applicable):

oVirt Engine
3.5.0.1-1.el6

How reproducible:

Send search request /api/vms?search={query} 


Steps to Reproduce:
1. Create more then one VM on your oVirt

2. curl http://{engine_ip}/api/vms?search=name%3D{vm_name} -u "alt@internal":XXXX -H "filter: true" -H "Accept-Encoding: identity" -H "Prefer: persistent-auth" -H "Content-type: application/xml" -H "Accept: application/xml" -k -i -v


Actual results:

All VM:s are returned 

Expected results:

Only the specified vm 

Additional info:

This error occurs also for  "/api/templates?search={query}"

However search works fine using admin user where you don't need to send filter:true header.

Comment 1 Juan Hernández 2015-04-16 13:44:07 UTC
This is a known limitation of the RESTAPI. It is already reported in bug 1163105 and will be fixed in version 3.6.

*** This bug has been marked as a duplicate of bug 1163105 ***