This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 830913 - Ovirt Rest API - 'from' in search is treated as parameter
Ovirt Rest API - 'from' in search is treated as parameter
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
3.1.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Michael Pasternak
Elena
infra
:
Depends On:
Blocks: 847369
  Show dependency treegraph
 
Reported: 2012-06-11 12:21 EDT by Elena
Modified: 2016-02-10 14:34 EST (History)
13 users (show)

See Also:
Fixed In Version: si7
Doc Type: Release Note
Doc Text:
A new syntax for performing event search using the REST API is now supported. The event search URI is now of the form <literal>/api/events;from=</literal><replaceable>&lt;event_id&gt;</replaceable>. The existing search syntax remains supported but is considered deprecated and will be removed in a future release.
Story Points: ---
Clone Of:
: 847369 (view as bug list)
Environment:
Last Closed: 2012-12-04 15:01:01 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Elena 2012-06-11 12:21:35 EDT
This query doesn't return correct results:
/api/events;from=<event_id>;?search=type%3D<type_num>

and this one does:
/api/events?search=type%3D<type_num>&from=<event_id>

from/ should be treated as REST matrix parameter and not ovirt-engine search parameter
Comment 1 Geert Jansen 2012-07-11 10:30:22 EDT
What's wrong with the format we currently have? The ";" style parameters have never caught up (and they are supposed to be apply to a path segment only by the way).
Comment 2 Michael Pasternak 2012-07-12 09:34:10 EDT
the decision to use matrix parameters was made due to:

1. we wanted to create clear differentiation between query (search) parameters 
   and parameters exposed in api only, i.e if user seeing 'max', 
   'case_sensitive', etc. parameters in api, he will not expect to find them 
   in UI search.
 
2. Matrix parameters apply to a particular path element while query parameters 
   apply to the request as a whole, so it will give us much more flexibility in 
   the future.

3. matrix parameters can have more than one value, i.e: 
   /matrix_param=value1,value2
Comment 3 Geert Jansen 2012-07-13 07:55:28 EDT
I think it's confusing to have two types of parameters. And i don't think #1-#3 above are enough justification for breaking compatibility.

But in any case, we cannot break compatibility before 4.0.
Comment 4 Michael Pasternak 2012-07-15 02:34:48 EDT
(In reply to comment #3)
> I think it's confusing to have two types of parameters. 

wouldn't be more confusing to have only one type of params, while a
part of them not available in UI?,

and people would confusing when concatenating them to search string doing
"... name=X... and case_sensitive = false" while correct format would be:
"... name=X..."&&case_sensitive = false as it not really search query param.

anyway, non query params documented in /api resource & RSDL & UG

> And i don't think
> #1-#3 above are enough justification for breaking compatibility.
> 
> But in any case, we cannot break compatibility before 4.0.

old style will be kept till 4.0
Comment 8 Stephen Gordon 2012-08-14 11:34:25 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
A new syntax for searching for events using the REST API is now supported. The event search URI is now of the form <literal>/api/events;from=</literal><replaceable>&lt;event_id&gt;</replaceable>. The existing search syntax remains supported but is considered deprecated and will be removed in Red Hat Enterprise Virtualization 4.0.
Comment 9 Stephen Gordon 2012-08-14 11:36:18 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-A new syntax for searching for events using the REST API is now supported. The event search URI is now of the form <literal>/api/events;from=</literal><replaceable>&lt;event_id&gt;</replaceable>. The existing search syntax remains supported but is considered deprecated and will be removed in Red Hat Enterprise Virtualization 4.0.+A new syntax for searching for events using the REST API is now supported. The event search URI is now of the form <literal>/api/events;from=</literal><replaceable>&lt;event_id&gt;</replaceable>. The existing search syntax remains supported but is considered deprecated and will be removed in a future release.
Comment 10 Stephen Gordon 2012-08-14 11:39:02 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-A new syntax for searching for events using the REST API is now supported. The event search URI is now of the form <literal>/api/events;from=</literal><replaceable>&lt;event_id&gt;</replaceable>. The existing search syntax remains supported but is considered deprecated and will be removed in a future release.+A new syntax for performing event search using the REST API is now supported. The event search URI is now of the form <literal>/api/events;from=</literal><replaceable>&lt;event_id&gt;</replaceable>. The existing search syntax remains supported but is considered deprecated and will be removed in a future release.

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