The chat responses are generated using Generative AI technology for intuitive search and may not be entirely accurate. They are not intended as professional advice. For full details, including our use rights, privacy practices and potential export control restrictions, please refer to our Generative AI Service Terms of Use and Generative AI Service Privacy Information. As this is a test version, please let us know if something irritating comes up. Like you get recommended a chocolate fudge ice cream instead of an energy managing application. If that occurs, please use the feedback button in our contact form!
Skip to content

JSON

Structure

Senseye's JSON format allows data from multiple assets to be transferred within a single file.

example@1651147200.json
[
    {
        "assetId": "mappingId",
        "dataPoints": [
            {
                "timestamp": "2022-04-28T12:00:00+02:00",
                "measures": [
                    {
                        "name": "temperature",
                        "value": 20
                    },
                    {
                        "name": "current",
                        "value": 516
                    },
                    {
                        "name": "product",
                        "value": "A24"
                    },
                    {
                        "name": "run",
                        "value": true
                    }
                ]
            },
            {
                "timestamp": "2022-04-28T12:45:55+02:00",
                "measures": [
                    {
                        "name": "current",
                        "value": 502
                    }
                ]
            }
        ]
    }
]
example@1651147200.json
[{
    "sensorId": "sensorId",
    "dataPoints": [{
        "timestamp": "2022-04-28T12:00:00+02:00",
        "measures": [{
            "name": "temperature",
            "value": 20
        },{
            "name": "current",
            "value": 516
        },{
            "name": "product",
            "value": "A24"
        },{
            "name": "run",
            "value": true
        }]
    }, {
        "timestamp": "2022-04-28T12:45:55+02:00",
        "measures": [{
            "name": "current",
            "value": 502
        }]
    }]
}]

A larger example with multiple assets can be downloaded here.

The following describes the structure in further detail, in addition, a JSON Schema definition is available.

Root:

  • The root of the JSON should be an array which contains data for one or more sensors - see 'Sensor Data'

Sensor Data:

  • assetId: a unique mapping ID for a sensor. If a sensor with the mapping ID does not exist, a new sensor will be provisioned.
  • sensorId: a UUID that Senseye has allocated to a sensor. This field is used only if the sensor already exists.
  • datapoints: an array of datapoints obtained from the asset - see 'Datapoint'. There should be one entry per timestamp.

NOTE: Please provide either assetId or sensorId, but not both.

Datapoint:

  • timestamp: should be a string conforming with RFC3339 dates and times, including timezone - more details on the required format are available here.
  • measures: an array measurement values for the given timestamp - see 'Measurement',

Measurement:

  • name: a string name given to the measurement. This value will be the name associated with the time series within Senseye.
  • value: the value of the measure. Can be either a number, boolean or string. Floating point numbers should be in the format 1.234e-56.

File

Name

To avoid file collisions, the name of the file should be unique. To aid debugging, we recommend composing the file name using two components: an ID for the asset or group of assets being monitored, and a unix timestamp, separated by @ - as an example: motors@1651149458.json.

Size

Please limit JSON files to no more than 1MB.

Encoding

The data file must use UTF-8 character encoding.