Orion Context Broker - Request
In version 0.23 of the Orion context broker.
Is it possible to query context for objects with a specific attribute value? How?
Is it possible to query objects generated at a specific time interval? How?
For geolocation filter. Is there a limit on the vertices of a polygon other than the request size of 1MG?
thank
source to share
For filters on attribute values, check out this other Q&A post .
Regarding queries to entities generated at a specific time interval, we plan to include this as a pseudo-attribute dateModified
("pseudo" in the sense that it is not an attribute managed by the NGSI client, but Orion), so you can make such a query to get all objects changed from January 1, 2015 to January 12, 2015:
GET /v2/entities?q=dateModified==2015-01-01..2015-01-12
This functionality has yet to be implemented, but as a workaround, your application can manage an attribute with the same semantics. For example. you can use entity attribute with name myDate
, keeping date as timestamp, and execute same query like this:
GET /v2/entities?q=myDate==1420070400..1421020800
Note: 2015-01-01 is equal to 1420070400 and 2015-01-12 is equal to 1421020800, the following page may help: http://www.timestampgenerator.com
As for the limits of polygon regions in geo-queries, we haven't found a limit yet. However, if you check with a lot and find a limit, please let us know.
source to share