Complex filter expressions in API queries

Registered by Ildiko Vancsa on 2013-11-22

The current version of the API supports only the AND relation between the fields of the query filters. The idea is to provide the possibility to use both AND and OR relations and build complex filtering expressions with them.

In order to support these complex filters:
* a query grammar should be defined, which
** satisfies the current needs
** is extendable to include further demands later
* the complex filter expressions should be convertible into JSON strings
* POST requests have to be used instead of GET, to be able to send the JSON query filter string in the body of the request
* consider the creation of a new REST resource for queries
** to avoid the difficulties during the modification of the current solution
** keep the API as simple and modular as possible
* choose a DB driver for a proof of concept implementation

The etherpad with further details and comments, can be found here:
https://etherpad.openstack.org/p/Ceilometer_extended_API_query_filtering

Wiki: https://wiki.openstack.org/wiki/Ceilometer/ComplexFilterExpressionsInAPIQueries

Blueprint information

Status:
Complete
Approver:
Julien Danjou
Priority:
High
Drafter:
Ildiko Vancsa
Direction:
Approved
Assignee:
Ildiko Vancsa
Definition:
Approved
Series goal:
Accepted for icehouse
Implementation:
Implemented
Milestone target:
milestone icon 2014.1
Started by
Ildiko Vancsa on 2013-12-03
Completed by
Ildiko Vancsa on 2014-02-28

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/complex-filter-expressions-in-api-queries,n,z

Addressed by: https://review.openstack.org/62158
    Implements complex query functionality for alarms

Addressed by: https://review.openstack.org/62159
    Implements complex query functionality for alarm history

Addressed by: https://review.openstack.org/62157
    Implements complex query functionality for samples

Addressed by: https://review.openstack.org/65302
    Implements field validation for complex query functionality

Addressed by: https://review.openstack.org/66687
    Implements in operator for complex query functionality

Addressed by: https://review.openstack.org/66891
    Implements metadata query for complex query feature

Addressed by: https://review.openstack.org/66892
    Implements "not" operator for complex query

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.