Get Alert History
Get alerts history with HTTP GET
Request
HTTP Method
GET
URL
https://api.thingspeak.com/alerts/history
URL Parameters
Name | Priority | Description |
---|---|---|
| Optional | The number of results to return. The default value is 10, the maximum value is 100. |
| Optional | Include only history items with requested_at
later than this time. Format times per ISO 8601. For example,
2020-05-15T20:03:48-05:00 represents May 15, 2020, 20:03:48 EST. If
you do not include the time zone offset, ThingSpeak assumes the
specified time is in UTC. Note: Alerts history items are retained
for only 7 days, after which they are no longer available. |
| Optional | Include only history items with requested_at
earlier than this time. Format times per ISO 8601. For example,
2020-05-15T20:03:48-05:00 represents May 15, 2020, 20:03:48 EST. If
you do not include the time zone offset, ThingSpeak assumes the
specified time is in UTC. Note: Alerts history items are retained
for only 7 days, after which they are no longer available. |
| Optional | Include only history items with subject containing this value, sensitive to case. |
| Optional | Include only history items with status containing this value. |
Example:
https://api.thingspeak.com/alerts/history?count=10
Headers
Name | Priority | Description | Value Type |
---|---|---|---|
ThingSpeak-Alerts-API-Key | Required | Specify the alerts API key, which you can find in your profile. This key is different from the channel API and user API keys. | string |
Body Parameters
There are no available body parameters for this API call.
Response
Success
200 OK
Error
You can use the Accept
header to control the detail provided
with error messages. Provide the Accept
header and key
application/json,application/problem+json
and the server
returns detailed error messages along with the standard HTTP response code.
For the full list of possible HTTP errors, see Error Codes.