Read Last Status
Read last status of channel with HTTP GET
Request
HTTP Method
GET
URL
https://api.thingspeak.com/channels/
<channel_id>
/status/last.<format>
URL Parameters
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
Query String Parameters
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 |
Examples
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.
Read Last Status in JSON Format
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.
Read Last Status of Office Plant Channel in XML 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.
Read Last Status from a Private Channel in JSON 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
Response
Error
For the full list, see Error Codes.
If you do not have access to the channel, the response is -1.