http://api.thingspeak.com
https://api.thingspeak.com
http://184.106.153.149
http://api.thingspeak.com/crossdomain.xml
http://160.16.121.247:3000/update.json.xml
.
2014-12-31 23:59:59
. Time zones can be specified via the timezone parameter (optional)POST http://160.16.121.247:3000/update.json.xml api_key=XXXXXXXXXXXXXXXX field1=73
18
0
then the update failed.
{ "channel_id": 3, "field1": "73", "field2": null, "field3": null, "field4": null, "field5": null, "field6": null, "field7": null, "field8": null, "created_at": "2014-02-25T14:13:01-05:00", "entry_id": 320, "status": null, "latitude": null, "longitude": null, "elevation": null }
<?xml version="1.0" encoding="UTF-8"?> <feed> <channel-id type="integer">3</channel-id> <field1>73</field1> <field2 nil="true"/> <field3 nil="true"/> <field4 nil="true"/> <field5 nil="true"/> <field6 nil="true"/> <field7 nil="true"/> <field8 nil="true"/> <created-at type="dateTime">2014-02-25T14:15:42-05:00</created-at> <entry-id type="integer">321</entry-id> <status nil="true"/> <latitude type="decimal" nil="true"/> <longitude type="decimal" nil="true"/> <elevation nil="true"/> </feed>
http://160.16.121.247:3000/channels/CHANNEL_ID/feeds.json.xml
,
replacing CHANNEL_ID with the ID of your Channel.
GET http://160.16.121.247:3000/channels/9/feeds.json.xml?results=2
{ "channel": { "id": 9, "name": "my_house", "description": "Netduino Plus connected to sensors around the house", "latitude": "40.44", "longitude": "-79.996", "field1": "Light", "field2": "Outside Temperature", "created_at": "2010-12-13T20:20:06-05:00", "updated_at": "2014-02-26T12:43:04-05:00", "last_entry_id": 6060625 }, "feeds": [ { "created_at": "2014-02-26T12:42:49-05:00", "entry_id": 6060624, "field1": "188", "field2": "25.902335456475583" }, { "created_at": "2014-02-26T12:43:04-05:00", "entry_id": 6060625, "field1": "164", "field2": "25.222929936305732" } ] }
{ "channel": { "id": 9, "name": "my_house", "description": "Netduino Plus connected to sensors around the house", "latitude": "40.44", "longitude": "-79.996", "field1": "Light", "field2": "Outside Temperature", "created_at": "2010-12-13T20:20:06-05:00", "updated_at": "2014-02-26T12:43:04-05:00", "last_entry_id": 6060625 }, "feeds": [ { "created_at": "2014-02-26T12:42:49-05:00", "entry_id": 6060624, "field1": "188", "field2": "25.902335456475583" }, { "created_at": "2014-02-26T12:43:04-05:00", "entry_id": 6060625, "field1": "164", "field2": "25.222929936305732" } ] }
<?xml version="1.0" encoding="UTF-8"?> <channel> <id type="integer">9</id> <name>my_house</name> <description>Netduino Plus connected to sensors around the house</description> <latitude type="decimal">40.44</latitude> <longitude type="decimal">-79.996</longitude> <field1>Light</field1> <field2>Outside Temperature</field2> <created-at type="dateTime">2010-12-13T20:20:06-05:00</created-at> <updated-at type="dateTime">2014-02-26T12:49:19-05:00</updated-at> <last-entry-id type="integer">6060650</last-entry-id> <feeds type="array"> <feed> <created-at type="dateTime">2014-02-26T12:49:04-05:00</created-at> <entry-id type="integer">6060649</entry-id> <field1>160</field1> <field2>25.307855626326962</field2> <id type="integer" nil="true"/> </feed> <feed> <created-at type="dateTime">2014-02-26T12:49:19-05:00</created-at> <entry-id type="integer">6060650</entry-id> <field1>171</field1> <field2>22.929936305732483</field2> <id type="integer" nil="true"/> </feed> </feeds> </channel>
http://160.16.121.247:3000/channels/CHANNEL_ID/feeds/last.json.xml
,
replacing CHANNEL_ID with the ID of your Channel.
GET http://160.16.121.247:3000/channels/9/feeds/last.json.xml
{ "created_at": "2014-02-26T21:27:21Z", "entry_id": 6061519, "field1": "176", "field2": "28.195329087048833" }
{ "created_at": "2014-02-26T21:27:21Z", "entry_id": 6061519, "field1": "176", "field2": "28.195329087048833" }
<?xml version="1.0" encoding="UTF-8"?> <feed> <created-at type="dateTime">2014-02-26T21:28:51Z</created-at> <entry-id type="integer">6061525</entry-id> <field1>200</field1> <field2>28.365180467091296</field2> <id type="integer" nil="true"/> </feed>
http://160.16.121.247:3000/channels/CHANNEL_ID/feeds/ENTRY_ID.json.xml
,
replacing CHANNEL_ID with the ID of your Channel and ENTRY_ID with the ID of your entry.
GET http://160.16.121.247:3000/channels/9/feeds/6061519.json.xml
{ "created_at": "2014-02-26T21:27:21Z", "entry_id": 6061519, "field1": "176", "field2": "28.195329087048833" }
{ "created_at": "2014-02-26T21:27:21Z", "entry_id": 6061519, "field1": "176", "field2": "28.195329087048833" }
<?xml version="1.0" encoding="UTF-8"?> <feed> <created-at type="dateTime">2014-02-26T21:27:21Z</created-at> <entry-id type="integer">6061519</entry-id> <field1>176</field1> <field2>28.195329087048833</field2> <id type="integer" nil="true"/> </feed>
http://160.16.121.247:3000/channels/CHANNEL_ID/fields/FIELD_ID.json.xml
,
replacing CHANNEL_ID with the ID of your Channel and FIELD_ID with the ID of your field.
GET http://160.16.121.247:3000/channels/9/fields/1.json.xml?results=2
{ "channel": { "id": 9, "name": "my_house", "description": "Netduino Plus connected to sensors around the house", "latitude": "40.44", "longitude": "-79.996", "field1": "Light", "field2": "Outside Temperature", "created_at": "2010-12-13T20:20:06-05:00", "updated_at": "2014-02-26T12:43:04-05:00", "last_entry_id": 6060625 }, "feeds": [ { "created_at": "2014-02-26T12:42:49-05:00", "entry_id": 6060624, "field1": "188" }, { "created_at": "2014-02-26T12:43:04-05:00", "entry_id": 6060625, "field1": "164" } ] }
{ "channel": { "id": 9, "name": "my_house", "description": "Netduino Plus connected to sensors around the house", "latitude": "40.44", "longitude": "-79.996", "field1": "Light", "field2": "Outside Temperature", "created_at": "2010-12-13T20:20:06-05:00", "updated_at": "2014-02-26T12:43:04-05:00", "last_entry_id": 6060625 }, "feeds": [ { "created_at": "2014-02-26T12:42:49-05:00", "entry_id": 6060624, "field1": "188" }, { "created_at": "2014-02-26T12:43:04-05:00", "entry_id": 6060625, "field1": "164" } ] }
<?xml version="1.0" encoding="UTF-8"?> <channel> <id type="integer">9</id> <name>my_house</name> <description>Netduino Plus connected to sensors around the house</description> <latitude type="decimal">40.44</latitude> <longitude type="decimal">-79.996</longitude> <field1>Light</field1> <field2>Outside Temperature</field2> <created-at type="dateTime">2010-12-13T20:20:06-05:00</created-at> <updated-at type="dateTime">2014-02-26T12:49:19-05:00</updated-at> <last-entry-id type="integer">6060650</last-entry-id> <feeds type="array"> <feed> <created-at type="dateTime">2014-02-26T12:49:04-05:00</created-at> <entry-id type="integer">6060649</entry-id> <field1>160</field1> <id type="integer" nil="true"/> </feed> <feed> <created-at type="dateTime">2014-02-26T12:49:19-05:00</created-at> <entry-id type="integer">6060650</entry-id> <field1>171</field1> <id type="integer" nil="true"/> </feed> </feeds> </channel>
http://160.16.121.247:3000/channels/CHANNEL_ID/fields/FIELD_ID/last.json.xml
,
replacing CHANNEL_ID with the ID of your Channel and FIELD_ID with the ID of your field.
GET http://160.16.121.247:3000/channels/9/fields/1/last.json.xml
176
{ "created_at": "2014-02-26T21:27:21Z", "entry_id": 6061519, "field1": "176" }
<?xml version="1.0" encoding="UTF-8"?> <feed> <created-at type="dateTime">2014-02-26T21:28:51Z</created-at> <entry-id type="integer">6061525</entry-id> <field1>200</field1> <id type="integer" nil="true"/> </feed>
http://160.16.121.247:3000/channels/CHANNEL_ID/status.json.xml
,
replacing CHANNEL_ID with the ID of your Channel.
GET http://160.16.121.247:3000/channels/1417/status.json.xml
{ "channel": { "name": "CheerLights", "latitude": "40.5", "longitude": "-80.22" }, "feeds": [ { "created_at": "2014-02-26T02:28:01Z", "entry_id": 11888, "status": "@cheerlights green" }, { "created_at": "2014-02-26T22:05:31Z", "entry_id" :11889, "status": "@cheerlights blue" } ] }
{ "channel": { "name": "CheerLights", "latitude": "40.5", "longitude": "-80.22" }, "feeds": [ { "created_at": "2014-02-26T02:28:01Z", "entry_id": 11888, "status": "@cheerlights green" }, { "created_at": "2014-02-26T22:05:31Z", "entry_id" :11889, "status": "@cheerlights blue" } ] }
<?xml version="1.0" encoding="UTF-8"?> <channel> <name>CheerLights</name> <latitude type="decimal">40.5</latitude> <longitude type="decimal">-80.22</longitude> <feeds type="array"> <feed> <created-at type="dateTime">2014-02-26T02:28:01Z</created-at> <entry-id type="integer">11888</entry-id> <status>@cheerlights green</status> <id type="integer" nil="true"/> </feed> <feed> <created-at type="dateTime">2014-02-26T22:05:31Z</created-at> <entry-id type="integer">11889</entry-id> <status>@cheerlights blue</status> <id type="integer" nil="true"/> </feed> </feeds> </channel>
http://160.16.121.247:3000/channels/public.json.xml
.
GET http://160.16.121.247:3000/channels/public.json.xml
{ "pagination": { "current_page": 1, "per_page": 15, "total_entries": 653 }, "channels": [ { "id": 9, "name": "my_house", "description": "Netduino Plus connected to sensors around the house", "latitude": "40.44", "longitude": "-79.996", "created_at": "2010-12-13T20:20:06-05:00", "elevation": "", "last_entry_id": 6062691, "ranking" :100, "username":"hans", "tags": [ { "id": 9, "name": "temp" },{ "id": 25, "name": "light" } ] }, { "id": 5683, "name": "Residential Data Points", "description": "Arduino Uno + Ethernet Shield", "latitude": "35.664548", "longitude": "-78.654972", "created_at": "2013-05-15T12:33:57-04:00", "elevation": "100", "last_entry_id": 731713, "ranking": 100, "username": "samlro", "tags": [ { "id": 950, "name": "Analog Inputs" } ] } ] }
<?xml version="1.0" encoding="UTF-8"?> <response> <pagination> <current-page type="WillPaginate::PageNumber">1</current-page> <per-page type="integer">15</per-page> <total-entries type="integer">654</total-entries> </pagination> <channels type="array"> <channel> <id type="integer">9</id> <name>my_house</name> <description> Netduino Plus connected to sensors around the house </description> <latitude type="decimal">40.44</latitude> <longitude type="decimal">-79.996</longitude> <created-at type="dateTime">2010-12-13T20:20:06-05:00</created-at> <elevation/> <last-entry-id type="integer">6062720</last-entry-id> <ranking type="integer">100</ranking> <username>hans</username> <tags type="array"> <tag> <id type="integer">9</id> <name>temp</name> </tag> <tag> <id type="integer">25</id> <name>light</name> </tag> </tags> </channel> <channel> <id type="integer">5683</id> <name>Residential Data Points</name> <description>Arduino Uno + Ethernet Shield</description> <latitude type="decimal">35.664548</latitude> <longitude type="decimal">-78.654972</longitude> <created-at type="dateTime">2013-05-15T12:33:57-04:00</created-at> <elevation>100</elevation> <last-entry-id type="integer">731720</last-entry-id> <ranking type="integer">100</ranking> <username>samlro</username> <tags type="array"> <tag> <id type="integer">950</id> <name>Analog Inputs</name> </tag> </tags> </channel> </channels> </response>
http://160.16.121.247:3000/channels.json.xml
.
GET http://160.16.121.247:3000/channels.json.xml
[ { "id": 9, "name": "my_house", "description": "Netduino Plus connected to sensors around the house", "latitude": "40.44", "longitude": "-79.996", "created_at": "2010-12-13T20:20:06-05:00", "elevation": "", "last_entry_id": 6062691, "ranking" :100, "username":"hans", "tags": [], "api_keys": [ { "api_key": "XXXXXXXXXXXXXXXX", "write_flag": true } ] }, { "id": 5683, "name": "Residential Data Points", "description": "Connected Arduino", "latitude": "32.664548", "longitude": "-73.654972", "created_at": "2013-05-15T12:33:57-04:00", "elevation": "100", "last_entry_id": 731713, "ranking": 100, "username": "hans", "tags": [], "api_keys": [ { "api_key": "XXXXXXXXXXXXXXXX", "write_flag": true } ] } ]
<?xml version="1.0" encoding="UTF-8"?> <channels type="array"> <channel> <id type="integer">9</id> <name>my_house</name> <description> Netduino Plus connected to sensors around the house </description> <latitude type="decimal">40.44</latitude> <longitude type="decimal">-79.996</longitude> <created-at type="dateTime">2010-12-13T20:20:06-05:00</created-at> <elevation/> <last-entry-id type="integer">6062720</last-entry-id> <ranking type="integer">100</ranking> <username>hans</username> <tags type="array" /> <api-keys type="array"> <api-key> <api-key>XXXXXXXXXXXXXXXX</api-key> <write-flag type="boolean">true</write-flag> </api-key> </api-keys> </channel> <channel> <id type="integer">5683</id> <name>Residential Data Points</name> <description>Connected Arduino</description> <latitude type="decimal">32.664548</latitude> <longitude type="decimal">-73.654972</longitude> <created-at type="dateTime">2013-05-15T12:33:57-04:00</created-at> <elevation>100</elevation> <last-entry-id type="integer">731720</last-entry-id> <ranking type="integer">100</ranking> <username>hans</username> <tags type="array" /> <api-keys type="array"> <api-key> <api-key>XXXXXXXXXXXXXXXX</api-key> <write-flag type="boolean">true</write-flag> </api-key> </api-keys> </channel> </channels>
http://160.16.121.247:3000/channels/CHANNEL_ID.json.xml
.
GET http://160.16.121.247:3000/channels/1417.json.xml
{ "id": 4, "name": "My New Channel", "description": null, "metadata": null, "latitude": null, "longitude": null, "created_at": "2014-03-25T13:12:50-04:00", "elevation": null, "last_entry_id": null, "ranking": 15, "username": "hans", "tags": [] }
<?xml version="1.0" encoding="UTF-8"?> <channel> <id type="integer">4</id> <name>My New Channel</name> <description nil="true" /> <metadata nil="true" /> <latitude type="decimal" nil="true" /> <longitude type="decimal" nil="true" /> <created-at type="dateTime">2014-03-25T20:17:44-04:00</created-at> <elevation nil="true" /> <last-entry-id type="integer" nil="true" /> <ranking type="integer">15</ranking> <username>hans</username> <tags type="array" /> </channel>
http://160.16.121.247:3000/channels.json.xml
.
POST http://160.16.121.247:3000/channels.json.xml api_key=XXXXXXXXXXXXXXXX name=My New Channel
{ "id": 4, "name": "My New Channel", "description": null, "metadata": null, "latitude": null, "longitude": null, "created_at": "2014-03-25T13:12:50-04:00", "elevation": null, "last_entry_id": null, "ranking": 15, "username": "hans", "tags": [], "api_keys": [ { "api_key": "XXXXXXXXXXXXXXXX", "write_flag": true } ] }
<?xml version="1.0" encoding="UTF-8"?> <channel> <id type="integer">4</id> <name>My New Channel</name> <description nil="true" /> <metadata nil="true" /> <latitude type="decimal" nil="true" /> <longitude type="decimal" nil="true" /> <created-at type="dateTime">2014-03-25T20:17:44-04:00</created-at> <elevation nil="true" /> <last-entry-id type="integer" nil="true" /> <ranking type="integer">15</ranking> <username>hans</username> <tags type="array" /> <api-keys type="array"> <api-key> <api-key>XXXXXXXXXXXXXXXX</api-key> <write-flag type="boolean">true</write-flag> </api-key> </api-keys> </channel>
http://160.16.121.247:3000/channels/CHANNEL_ID.json.xml
.
PUT http://160.16.121.247:3000/channels/4.json.xml api_key=XXXXXXXXXXXXXXXX name=Updated Channel
{ "id": 4, "name": "Updated Channel", "description": null, "metadata": null, "latitude": null, "longitude": null, "created_at": "2014-03-25T13:12:50-04:00", "elevation": null, "last_entry_id": null, "ranking": 15, "username": "hans", "tags": [], "api_keys": [ { "api_key": "XXXXXXXXXXXXXXXX", "write_flag": true } ] }
<?xml version="1.0" encoding="UTF-8"?> <channel> <id type="integer">4</id> <name>Updated Channel</name> <description nil="true" /> <metadata nil="true" /> <latitude type="decimal" nil="true" /> <longitude type="decimal" nil="true" /> <created-at type="dateTime">2014-03-25T20:17:44-04:00</created-at> <elevation nil="true" /> <last-entry-id type="integer" nil="true" /> <ranking type="integer">15</ranking> <username>hans</username> <tags type="array" /> <api-keys type="array"> <api-key> <api-key>XXXXXXXXXXXXXXXX</api-key> <write-flag type="boolean">true</write-flag> </api-key> </api-keys> </channel>
http://160.16.121.247:3000/channels/CHANNEL_ID/feeds.json.xml
.
DELETE http://160.16.121.247:3000/channels/4/feeds.json.xml api_key=XXXXXXXXXXXXXXXX
[]
<?xml version="1.0" encoding="UTF-8"?> <nil-classes type="array" />
http://160.16.121.247:3000/channels/CHANNEL_ID.json.xml
,
replacing CHANNEL_ID with the ID of your Channel.
DELETE http://160.16.121.247:3000/channels/4.json.xml api_key=XXXXXXXXXXXXXXXX
{ "id": 4, "name": "My New Channel", "description": null, "latitude": null, "longitude": null, "created_at": "2014-03-25T13:12:50-04:00", "elevation": null, "last_entry_id": null, "ranking": 15, "username": "hans", "tags": [] }
<?xml version="1.0" encoding="UTF-8"?> <channel> <id type="integer">4</id> <name>My New Channel</name> <description nil="true" /> <latitude type="decimal" nil="true" /> <longitude type="decimal" nil="true" /> <created-at type="dateTime">2014-03-25T20:17:44-04:00</created-at> <elevation nil="true" /> <last-entry-id type="integer" nil="true" /> <ranking type="integer">15</ranking> <username>hans</username> <tags type="array" /> </channel>
Using the ThingSpeak Importer, you are able to import data from a CSV file directly into a ThingSpeak Channel. The access the Importer, select a Channel, and click Import Data.
The format for the CSV should be the following:
datetime,field1,field2,field3,field4,field5,field6,field7,field8,latitude,longitude,elevation,status
Here is an example CSV file: Sample CSV File
You only have to send a datetime stamp and at least one field. The datetime stamp can be in many formats such as epoch, ISO 8601, or MySQL time. If the datetime includes a GMT/UTC offset, we will use that to properly import the data. If your datetime stamps do not have a GMT / UTC offset, you can specify a time zone that the data was logged in.