Upload a Set of Timestamped Data
You can update a single Datastream with a set of timestamped data points. This can be helpful when you don't stream the data in real-time, but instead, collect it on the device and need to send it periodically as a dataset.
For example, your device can be offline most of the time, but connect periodically and upload a set of data points.
When sending the data you would need to provide a timestamp for each value and send the timestamp and value as a single entry, like this:
[[timestamp, value]]. Where
timestampis the time difference between the current time and midnight, January 1, 1970 UTC measured in milliseconds.
The timestamp is the same as
Unix timestampmultiplied by 1000ms.
The single entry format:
[[timestamp, value]]The full body with multiple entries:
[[timestamp1, value1], [timestamp2, value2]]
Upload a Set Of Datapoints With Timestamps
curl -X POST -H 'Content-Type: application/json' -d '[[1650378744000,0]]' -i 'https://blynk.cloud/external/api/batch/update?token=YOUR_TOKEN&pin=v1'