Bug 999812 - RestAPI URI template style query for 'users' and 'disks' resources do not work.
Summary: RestAPI URI template style query for 'users' and 'disks' resources do not work.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.3.0
Assignee: Ori Liel
QA Contact: Ondra Machacek
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-22 07:48 UTC by Prasad Mukhedkar
Modified: 2018-12-02 15:19 UTC (History)
9 users (show)

Fixed In Version: is12
Doc Type: Bug Fix
Doc Text:
It is now possible for the REST API to retrieve users and disk resources by pagination, so the results can be sorted accordingly to the specified category.
Clone Of:
Environment:
Last Closed: 2014-01-21 17:36:02 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2014:0038 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Virtualization Manager 3.3.0 update 2014-01-21 22:03:06 UTC

Description Prasad Mukhedkar 2013-08-22 07:48:13 UTC
Description of problem:

I have more than 100 users and more than 100 vms. I am able to retrieve all vms by pagination: 

GET /api/vms?search=sortby%20name%20desc%20page%201

But when I used same query style for 'users' and 'disks' resources. It does not return any value at all:

GET /api/users?search=sortby%20name%20desc%20page%201
GET /api/disks?search=sortby%20name%20desc%20page%1


How reproducible:
always 

Steps to Reproduce:
1. Just try to open this url: http://rhevm-fqdn/api/disks?search=sortby%20name%20desc%20page%1
2. output will blank 


Actual results:
No output

Expected results:
like 'vms' resources, users and disks should also work properly

Additional info:

Comment 1 Ori Liel 2013-08-27 09:39:49 UTC
With users there is a real problem, fixed by this patch: 

   http://gerrit.ovirt.org/#/c/18593/

But with disks the problem is in the query that you used - when using 'alias' instead of 'name', it works (we don't use 'name' field for disk).

Comment 2 Ori Liel 2013-08-27 11:58:55 UTC
Fixed, 

commit 57ddedfb511c24e2d56e691d9c87f5d576567196

Comment 3 Ondra Machacek 2013-11-01 09:47:17 UTC
Both queries works ok in is21.
Result is sorted disks/users.

GET /users?search=sortby%20name%20desc%20page%201
GET /disks?search=sortby%20alias%20desc%20page%201

Comment 4 Charlie 2013-11-28 00:19:02 UTC
This bug is currently attached to errata RHEA-2013:15231. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag.

Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information:

* Cause: What actions or circumstances cause this bug to present.
* Consequence: What happens when the bug presents.
* Fix: What was done to fix the bug.
* Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore')

Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug.

For further details on the Cause, Consequence, Fix, Result format please refer to:

https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes 

Thanks in advance.

Comment 5 errata-xmlrpc 2014-01-21 17:36:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2014-0038.html


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