Hi Lucas,
was this template already used and you have such measurements in your tenant?
In general, measurements are following a specific structure that foresees each measurement value to be embedded within a fragment and a series (often the fragment is being used for classification purposes and the series as measurement-name).
In this example "c8y_Steam is the fragment
, “Temperature” the series
and “c8y_TemperatureMeasurement” the type
:
{
"source": {
"id": "251982"
},
"time": "2020-03-19T12:03:27.845Z",
"type": "c8y_TemperatureMeasurement",
"c8y_Steam": {
"Temperature": {
"unit": "C",
"value": 100
}
}
}
You’ll need to have 1..n
fragments with 1..n
series per fragment in your measurement. Each series needs to contain exactly one value
attribute. See measurement-design in this domain model article for more info.
If you have produced these measurements already:
Use this API Endpoint to query your devices measurements. GET /measurement/measurements?source={your device id}
should reveal the structure how your measurements are stored - including the fragments/series names. You can import the openApi spec to any REST Client (e.g. Postman) to do these queries. From your screenshot I would expect fragmentName is “mode” and series “bariatric”.
Another REST Endpoint that might be of interest is this one to retrieve all supported measurement fragments and series of a Managed Object