Skip to main content
Version: v4.5

Telemetry config

A telemetry configuration defines the following criteria:

  • The bindings between namedTelemetryCollections, telemetry items, and the IoT data. When a telemetry config updates, the bindings update.
  • Criteria to lookup the normalization script that normalizes the raw IoT data​

A telemetry config is owned by a namespace and you can only have one telemetry config per namespace.

Telemetry config schema#

When you define your telemetry config, refer to the following data structure with reference to the following table:

{  "_name": "",  "_userType": "",  "_configData": {    "_bindings": [      {        "collectionDesc": {          "<property>": "<value>"        },        "query": {          "<property>": "<value>"        }      }    ],    "_normalizationScript":{      "<property>": "<value>"    }  },  "_namespaces": [    ""  ],  "_shortName": "",  "_description": ""}
PropertyTypeDescriptionRequired
_nameStringName your telemetry configuration in long form with a maximum of 100 characters.Required
_userTypeStringEnter a new or shared custom type with a maximum of 100 characters.Required
_configDataObjectPass an object with your config data.Required
   - ._bindingsArray of ObjectPass an array that contains your bindings query objects. Pass an empty array or omit the property to look up all collections.Required
     - .collectionDescObjectPass an object that contains a key-value pair to target a named telemetry collection.Required
     - .queryObjectPass an object that contains a key-value pair to target the telemetry items you want to look up.Required
   - ._normalizationScriptObjectPass an object that contains a key-value pair to target your normalization script. If there is more than one match, the latest version returns.Required
_namespacesArray of StringEnter the namespace that you want to own the telemetry configuration.Required
_shortNameStringGive your telemetry configuration an abbreviated name with a maximum of 22 characters.Required
_descriptionStringEnter a description for the telemetry configurationRequired

Example#

{  "_name": "Telemetry Config - 1",  "_userType": "telemetry_config",  "_configData": {    "_bindings": [      {        "collectionDesc": {          "_userItemId": "tempsensor_gBDjAv6dl4"        },        "query": {            "deviceType": "temp-10"        }      }    ],    "_normalizationScript":{      "_userType":"telemetry_parser_script"    }  },  "_namespaces": [    "automation_3E4tpXPu"  ],  "_shortName": "telconfig",  "_description": "Telemetry Config for project A"}

APIs#

To post a telemetry config object to the item service, use Create Telemetry Config API.

To get, update, and delete telemetry configs on the platform, use the following APIs: