Send Bulk Data via ThingSpeak library, ESP32

Maria SS on 25 Sep 2022
Latest activity Edit by Maria SS on 26 Sep 2022

I wanted to ask that can we send bulk data through ThingSpeak ESP32 library using:
POST /channels/266256/bulk_update.csv HTTP/1.1
Host: api.thingspeak.com
Content-Type: application/x-www-form-urlencoded
time_format: relative
I saw it on mathswork "Bulk-Write CSV Data" (link: https://www.mathworks.com/help/thingspeak/bulkwritecsvdata.html)
Does ThingSpeak library supports the capability to send bulk csv data, any guidance?
Thanks and looking forward for your positive reply
Christopher Stapels
Christopher Stapels on 25 Sep 2022
The ThingSpeak library does not presently support the bulk update feature. There are good examples that show how to use bulk update on an Arduino like device without the thinglspeak library.
That example uses JSON formatiing, but you can easily adapt tit to CSV if you wish.
Maria SS
Maria SS on 26 Sep 2022
Hello Christopher,
First of all thanks for your reply, I am working on a project where I need to save sensor data on a file in SD card and than I need to transfer that file to server. I think, in Bulk-Update Using an Arduino or an ESP8266 tutorial on MathsWork, I need to first save json data in json file on SD card and than transfer that file but in
client.println("POST /channels/YOUR-CHANNEL-ID/bulk_update.json HTTP/1.1"); file name is only bulk_update.json, not sure whether I can transfer file or not to ThingSpeak.
Maria SS
Maria SS on 26 Sep 2022
Thankyou very much for your reply
Christopher Stapels
Christopher Stapels on 26 Sep 2022
The ThingSpeak bulk endpoint does not accept direct file transfers, but I dont think that is required. Your ESP32 device can write the information from the SD card to the HTTP client without converting to a file. Thanks for sharing some information about your project. What type of sensor data are you measuring?
Maria SS
Maria SS on 26 Sep 2022 (Edited on 26 Sep 2022)

I am measuring vibrations data and I need to bulk update the server(not ThingSpeak cloud) via http rather than sending one vibration reading at a time. I am not using ThingSpeak library now. I am using example provided in mathswork on Bulk update via esp8266