Read last status of channel with HTTP GET
GET
https://api.thingspeak.com/channels/
<channel_id>
/status/last.<format>
Name | Description |
---|---|
|
(Required) Channel ID for the channel of interest. |
|
(Required) Format for the HTTP response, specified as
|
Example:
https://api.thingspeak.com/channels/266256/status/last.json
Name | Description | Value Type |
---|---|---|
api_key |
(Required for private channels) Specify Read API Key for this specific channel. The Read API key is found on the API Keys tab of the channel view. | string |
You can use your web browser to complete GET HTTP requests to the RESTful API for ThingSpeak™. To see the format for an HTTP response, click the link or copy it to your browser.
Channel 276330 stores soil moisture information for an office plant. You can read
data from this public channel. The format for the response occurs at the end of the
URL, before any query string parameters. This example returns the last status entry
from channel 9 in JSON
format.
Channel 276330 stores soil moisture information for an office plant. Use the
extension XML
on the request to return the last status in
XML
format.
To read data from a private channel, supply the Read API Key after the parameter
api_key
. Append the first parameter after a question mark
?
.
https://api.thingspeak.com/channels/276330/status/last.json?api_key=E52AWRAV1RSXQQJW
For the full list, see Error Codes.
If you do not have access to the channel, the response is -1.