Filter queryContext with attribute value in orion context broker

245 views Asked by At

I'm doing a queryContext against my instance of Orion Context Broker and I would like to filter this query to obtain certain entities according to the value of one of the attributes.

I do not get filtered results using AttributeExpression, through a CURL request, or JavaScript Wirecloud NGSI API.

I browsed the Context Broker Orion code and it seems that AttributeExpression is not implemented.

Using JSON for queryContext with CURL.

Could you please give me an example?

1

There are 1 answers

0
fgalan On BEST ANSWER

Current Orion version (0.22.0 at time of writting this) implements a set of filters which are described in this section of the Orion user manual. Note that current filters are implemented in standard operations using Scope instead of AttributeExpression, but, at the end, this is also a common way in OMA NGSI of defining Restrictions.

Unfortunatelly, attribute value filters are not currently supported. Good news are that this functionality is part of the NGSIv2 with is being currently worked out. Have a look to the q URL parameters the "List entities" convenience operation at NGSIv2 specification webpage. The q filters parameter will also have a correspondence in a Restriction element for standard operations (to be defined at the present moment).