Import Datastream Values

This feature enables you to import historical data for a device's datastream. It's useful for scenarios where data isn't streamed in real-time but is instead collected on the device and sent periodically as a dataset.

For instance, if your device is usually offline and only connects intermittently to upload a batch of data points.

A maximum of 10,000 data points per device per day is allowed, regardless of whether the data is sent in multiple sets or in one batch.

This limit may vary depending on your subscription plan and is consistent with the Upload a Set of Timestamped Data endpoint in the Device HTTPS API.

Import DataStream Values

POST https://{server_address}/api/v1/organization/device/import/batch

Headers

Request Body

{
    "error": {
        "message": "Device with identifier 1 is not found or belong to another organization."
    }
}

Request examples:

# curl command example:
$ curl -X POST -H "Content-Type: application/json" \
      -H "Authorization: Bearer {accessToken}" \
      -d '{"deviceId":1,"dataStreamId":1,"values":[{"value":5,"ts":1702656423136},{"value":2,"ts":1702656428136}]}' \
      https://fra1.blynk.cloud/api/v1/organization/device/import/batch

$ curl -X POST -H "Content-Type: application/json" \
      -H "Authorization: Bearer eIdWHQqRfFmvP5LDDh-IGxPUzi7I27HthzCPAVmS" \
      -d '{"deviceId":1,"dataStreamId":1,"values":[{"value":5,"ts":1702656423136},{"value":2,"ts":1702656428136}]}' \
      https://fra1.blynk.cloud/api/v1/organization/device/import/batch

Last updated