Bug 872147 - [RESTAPI] User API for search query don't filter result by specified parameter
Summary: [RESTAPI] User API for search query don't filter result by specified parameter
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Michael Pasternak
QA Contact: Oded Ramraz
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-01 11:41 UTC by Ondra Machacek
Modified: 2018-01-24 08:15 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-04 07:31:38 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1534607 0 urgent CLOSED Unable to use paging when searching for VMs available for specific user sorted by name 2021-02-22 00:41:40 UTC

Internal Links: 1534607

Description Ondra Machacek 2012-11-01 11:41:41 UTC
Description of problem:


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

How reproducible:
always

Steps to Reproduce:
1. In webadmin. Create vm 'a' and vm 'b'
2. Add UserVmManager permissions on vm 'a' and vm 'b' for some user.
3. In API search one of vm.
  
Actual results:
All vms are return, doesnt matter what users search query look like.

Expected results:
Only filtered result by query should be returned.

Additional info:
curl https://url/api/vms?search=id%3Dabc
  <vms>
   <vm href="/api/vms/id" id="id">...</vm>
   <vm href="/api/vms/id" id="id">...</vm>
  </vms>

List instead of search is return for every object.

Comment 1 Michael Pasternak 2012-11-01 11:49:56 UTC
/id is not a part of engine search language (?search=id%3Dabc),
please recheck using /name or similar.

Comment 2 Ondra Machacek 2012-11-01 12:04:12 UTC
same issue for /name

Comment 3 Ondra Machacek 2012-11-01 12:41:49 UTC
Also doesn't work

https://10.34.63.30/api/templates/id/nics?search=name%3Dnic5
https://10.34.63.30/api/vms/id/disks?search=name%3Dnic5

Much more could be affected. This doesn't work even for admin users.

Comment 4 Itamar Heim 2012-11-01 18:13:30 UTC
this is "not a bug".
search is not supported for user level api today.

michael - is there a way to get a specific vm by its name via user api somehow?

Comment 5 Michael Pasternak 2012-11-04 07:31:38 UTC
(In reply to comment #4)
> this is "not a bug".
> search is not supported for user level api today.
> 
> michael - is there a way to get a specific vm by its name via user api
> somehow?

rnori already working fixing this at Bug 869334.

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

Comment 6 Michael Pasternak 2012-11-04 07:32:43 UTC
(In reply to comment #4)
> this is "not a bug".
> search is not supported for user level api today.
> 
> michael - is there a way to get a specific vm by its name via user api
> somehow?

only in sdk (using client side filtering).

Comment 7 Michael Pasternak 2013-01-24 15:15:23 UTC
based on Comment 4.


Note You need to log in before you can comment on or make changes to this bug.