CSV batch upload | ThingSpeak API | Forum

Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
CSV batch upload
No permission to create posts
August 12, 2019
7:42 am
Avatar
chris_1
New Member
Members
Forum Posts: 2
Member Since:
August 11, 2019
sp_UserOfflineSmall Offline

Hi

I'm trying to upload a CSV using Curl and the bulk_update.csv endpoint.

My Curl command is:

curl -v -X POST --data-urlencode 'write_api_key=XXXXXXX' --data-urlencode 'time_format=absolute' --data-urlencode 'updates@/tmp/thingspeak.csv' https://api.thingspeak.com/channels/XXXXXX/bulk_update.csv

The thingspeak.csv file is in the format as per the documentation, ie:
EPOCH, Field 1, ... | EPOCH, Field 1, ...

However, I'm getting error 400 "The request cannot be fulfilled due to bad syntax".

I can't see what is wrong. Anybody have any ideas?

August 12, 2019
1:55 pm
Avatar
chris_1
New Member
Members
Forum Posts: 2
Member Since:
August 11, 2019
sp_UserOfflineSmall Offline

Turns out I was missing some vertical bars in my data. All sorted now!

August 19, 2019
9:06 am
Avatar
cstapels
Moderator
Members


Moderators
Forum Posts: 754
Member Since:
March 7, 2017
sp_UserOnlineSmall Online

Unfortunately, the bulk CSV syntax can be kind of difficult to get correct. Thanks for lettings us know you got it working.
Here is the doc page in case you or someone else who finds this threat needs it:
https://www.mathworks.com/help/thingspeak/bulkwritecsvdata.html

Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online: cstapels
27 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 272

Vinod: 240

piajola: 95

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 8665

Moderators: 1

Admins: 2

Forum Stats:

Groups: 3

Forums: 14

Topics: 1600

Posts: 5760

Newest Members:

Fathima22, jefflam1994, harrydawson, markpaul7931, sgarsvk2rdx, Win Win

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457