Query Air Quality data in the Context Broker

Prerequisites

This section of the guide starts assuming you have already deployed your platform and deployed your Orion Context Broker.

It also assumes you have sensors inserting data in your Orion Context Broker. If you don't have any, you can simulate some data injection using the entities-simulator as follows. You need of course to configure the value of ORION_URL with the url of Orion in your deployment.

$ ORION_URL=http://$(docker-machine ip ms-manager0):1026
$ docker run -ti --rm -e ORION_URL=${ORION_URL} smartsdk/entities-simulator

If you feel like trying something more sophisticated, you can have a look at FIWARE Device Simulator.

Postman Collection

To make the experience easier, you can use a REST Client such as PostMan. With postman, you can import this postman collection from the SmartSDK Recipes repository. Postman collections are documented here.

Query Entities

The simplest of the queries is to retrieve all entities stored.

In the Postman Collection, within the Orion folder use the GET query to Orion Entities.

From the command line using curl,

curl -X GET ${ORION_URL}/v2/entities -H 'Accept: application/json'

For more details, refer to the official Orion's Query documentation