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.

Delete Channel

Delete channel with HTTP DELETE

Request

HTTP Method

POST

URL

https://api.thingspeak.com/channels/<channel_id>.<format>

URL Parameters

NameDescription

<channel_id>

(Required) Channel ID for the channel of interest, specified as an integer.

<format>

(Required) Format for the HTTP response, specified as json or xml.

Example:https://api.thingspeak.com/channels/999990.json

Body Parameters

NameDescriptionValue-Type
api_key

(Required) Specify User API Key, which you can find in your profile. This key is different from the channel API keys.

<string>

Content-Type

application/x-www-form-urlencoded

Response

Success

HTTP Status Code

200 OK

Body

 JSON Example

 XML Example

Error

For the full list, see Error Codes.

Examples

collapse all

You can use POSTMAN to try out your HTTP requests using the RESTful API for ThingSpeak. This example shows how to clear a channel using POSTMAN.

Here is the format of the HTTP request.

DELETE https://api.thingspeak.com/channels/400834.json
       api_key=XXXXXXXXXXXXXXXX

  1. In POSTMAN, select DELETE from the drop-down list of HTTP verbs.

  2. In the address bar, enter https://api.thingspeak.com/channels/<channelID>.json, replacing <channelID> with the ID of the channel you want to remove.

  3. Under the Body section, choose x-www-form-urlencoded.

  4. Enter the parameter api_key and your user API Key, which is found in Account > My Profile.

The response is a JSON object of the channel settings before deletion.

Was this topic helpful?