Measurements query

Hello!
Is it possible to query a collection of measurements filtering by the value of a customized fragment (not Measurement value-unit format)?

Example:

{
       "self": "https://tiagobo.us.cumulocity.com/measurement/measurements/4058316",
       "time": "2020-05-03T14:45:21.300-03:00",
       "id": "4058316",
       "source": {
            "self": "https://tiagobo.us.cumulocity.com/inventory/managedObjects/4057902",
            "id": "4057902"
       },
       "type": "c8y_AlgoritmoRastreado",
       "c8y_AlgoritmoRastreado": {
            "FamĂ­lia": {
                 "value": 1.0,
                 "unit": ""
            }
       },
       "PipeSerialNumber": 101
 }

I would like to get all measurements with fragment “PipeSerialNumber” value “101”. Is it possible?
Thank you!

Hi Tiago,

you probably resolved this already, so this is more as reference for others: such queries are not possible on measurements but only on the inventory API. If you need to query by the pipe serial number you could think about making it part of the fragment type or series. Alternatively you could also think about separating these via child devices.

best regards,
Harald

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.