HTTPS API

Update Multiple Datastreams Simultaneously

You can update multiple datastreams with one value each, with one GET request using the API format shown below.   All datastreams will have the same timestamp that is automatically assigned by the Blynk server.  


https://{server_address}/external/api/batch/update?token={token}&{pin1}={value1}&{pin2}={value2}

Where '{server_address}" can be found here: HTTPS API server addresses.   Replace {pin#} with the virtual pin reference and number, e.g. "V2" for virtual pin 2 (datastream 'V2'), and {value} with a value that is appropriate for the datastream. 

For example, if the server address is "ny3.blynk.cloud", and the token is "AbcdefgHIJklmnopqrstuvWxyZabcdeF", and datastream V0 is data type double, and datastream V1 is data type integer, and V2 is data type string, and V7 is a location data type (GPS), then the following GET will update those datastreams:


https://ny3.blynk.cloud/external/api/batch/update?token=AbcdefgHIJklmnopqrstuvWxyZabcdeF&V0=3.14&V1=101&V2="HEllo"&V7=-73.987&V7=40.725

 

An older API format that still works as of December 2022:


https://ny3.blynk.cloud/external/api/batch/update?token=AbcdefgHIJklmnopqrstuvWxyZabcdeF&V0=3.14&V1=101&V2="HEllo"&V7=-73.987,V7=40.725

 

Blynk documentation

Postman Example

Pushing Data From Other Cloud Services To Blynk

Build a Particle webhook to push data for one or more datastreams from a Tracker One / Monitor One / Boron / Argon / Photon / Electron device to the Blynk Cloud.  

 

Post a Set of Timestamped Data

You can update a single datastream with multiple values, and assign a timestamp to each value.   The maximum number of data points per day per device is 10,000 (varies by subscription plan).   The timestamp in milliseconds is the time difference from now and 1 Jan 1970 UTC (Unix epoh).   This is the same as the Unix timestamp multiplied by 1000 ms (the timestamp should have 13 digits).   Timestamps older than one month will be ignored.   Online Unix Epoch Clock

NOTE: Make sure you include a recent and never before submitted timestamp with your HTTP POST.   Duplicate timestamp values will be accepted (server response = 200 OK), but the datastream will not be updated with the new value.  

Blynk documentation

Postman Example

 

 


Do you need help developing or customizing a IoT product for your needs?   Send me an email requesting a free one hour phone / web share consultation.  

 

The information presented on this website is for the author's use only.   Use of this information by anyone other than the author is offered as guidelines and non-professional advice only.   No liability is assumed by the author or this web site.  

Projects

January 2023

Gateway + Nodes


January 2023

Pre-Designed Solutions