Bosch IoT Device Management

Add a query template

Open the web UI of your Bosch IoT Insights service instance (Service Subscriptions>Go to Dashboard).

Once there:

  • open the Explore tab and then Data Explorer.

  • click the plus icon to Add Query Template.

The query template can serve as the data source for a widget.
Refer to the Bosch IoT Insights' documentation of the Data Explorer to find out more about query templates.


images/confluence/download/attachments/2347568153/add-query-template.png

This will open the Template Designer, where you should:

  • set a Name for the query template

  • provide a Description (optional)

  • enter Labels (optional)

images/confluence/download/attachments/2347568153/template-designer.png


Scroll down to the Template Definition area.

images/confluence/download/attachments/2347568153/template-definition.png

There you should:

  • paste the following template

    [
    {
    "$match": {
    "metaData.thingId" : "namespace:name"
    }
    },
    { "$sort" : { "_id" : -1 }
    },
    { "$limit" : 100 }
    ]
  • replace the namespace:name identifier with the thingId of your own device

    You can copy it from the Bosch IoT Suite UI.

    images/confluence/download/attachments/2347568153/thing-id.png

  • when ready, click Create New Query Template