Bug 958772

Summary: RFE: Improve querying for resources
Product: [Other] RHQ Project Reporter: Libor Zoubek <lzoubek>
Component: RESTAssignee: Heiko W. Rupp <hrupp>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.6CC: theute
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 960959 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 966665    
Bug Blocks: 960959    

Description Libor Zoubek 2013-05-02 11:38:44 UTC
Description of problem: Currently our /rest/resource is not yet enough powerful. For example it returns resources that are not yet imported in inventory and there is no way to distinguish InventoryStatus

This BZ should have been only about InventoryStatus, although I think REST api deserves more general improvement.


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

What about supporting all possible (or a larger subset) Filters from ResourceCriteria

we would get rid of query parameter 'q' which now filters by name

And we add at least these parameters (those make sense for me)
name
status (InventoryStatus) : default COMMITED
availability (AvailabilityType) : default UP
type (resourceTypeName)
parentName (parentResourceName)
parentType (parentResourceTypeName)
pluginName
category would be kept
strict=true|false
order=fieldName

Comment 1 Heiko W. Rupp 2013-05-10 10:21:07 UTC
Addition of inventory status and filtering on it has been implemented in master as 8868d160 as Bug 960959

Comment 2 Heiko W. Rupp 2013-05-10 10:40:26 UTC
The parameter 'q' has been introduced as most search apis seem to use this (e.g google ), so it will not be dropped.