Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

REST API

Use REST API calls to create and update ThingSpeak™ channels and charts

Representational state transfer (REST) is an architectural style designed as a request-response model that communicates over HTTP. ThingSpeak, an IoT platform, uses the REST API calls GET, POST, PUT, and DELETE to create and delete channels, read and write channel data, and clear the data in a channel. A web browser or client sends a request to the server, which responds with data in the requested format. Web browsers use this interface to retrieve web pages or to send data to remote servers.

You can also use REST API calls with Act on Data which let you interact with social media, web services, and devices.

RESTful API Reference

expand all

Read DataRead data from all fields in a channel with HTTP GET
Read FieldRead data from a single field of a channel with HTTP GET
Read StatusRead status field of a channel with HTTP GET
Read Last EntryRead the last entry in a channel with HTTP GET
Read Last Field EntryRead the last entry in a field of a channel with HTTP GET
Read Last StatusRead the last status of a channel with HTTP GET
Write DataUpdate channel data with HTTP GET or POST
Bulk Write JSON DataWrite many entries to a channel in JSON format with a single HTTP POST
Bulk Write CSV DataWrite many entries to a channel in CSV format with a single HTTP POST.
List Your Public ChannelsList channels for a username with HTTP GET
List Your ChannelsList your channels with HTTP GET
List ChannelsList public channels with HTTP GET
Read SettingsRead channel settings with HTTP GET
Write SettingsUpdate channel settings with HTTP PUT
Create ChannelCreate a new channel with HTTP POST
Clear ChannelClear all data from channel with HTTP DELETE
Delete ChannelDelete channel with HTTP DELETE
Read Last Entry AgeRead the number of seconds since the last entry in a channel with HTTP GET
Read Last Field Entry AgeRead the number of seconds since the last entry in a field with HTTP GET
Create ChartGenerate a chart with HTTP GET

Topics

Channel Properties

ThingSpeak stores data in channels. Learn how to configure a channel to control access and how to sort your channels for faster access.

Channel Display Widgets

Choose among customizable visualizations of channel data.

Embed Your ThingSpeak Plots on Web Pages

You can use your ThingSpeak plot that updates in real time on any website.

Embed a Chart

Embed ThingSpeak charts on a custom website.

Bulk-Update a ThingSpeak Channel Using an Arduino or an ESP8266

Collect Wi-Fi® signal strength in JSON format every 15 seconds, and update channel once every two minutes using relative timestamps.

Bulk-Update a ThingSpeak Channel Using a Particle Photon Board

Collect data in CSV format every 15 seconds, and update channel once every two minutes using absolute timestamps.

Bulk-Update a ThingSpeak Channel Using a Raspberry Pi Board

Collect CPU temperature and utilization data in JSON format every 15 seconds, and update the channel once every two minutes using Raspberry Pi™ board running Python® 2.7.

Troubleshooting

Error Codes

See the details of ThingSpeakREST API error messages and corresponding HTTP status codes.