Delete a signal

DELETE /signals/:id

A signal can be deleted by making a DELETE HTTP request using the signal id.

Request parameters

Parameter Description
signal id Required integer 15 -510

Id of the Signal

Signal created via localhost will have negative ids

Request

BACKEND_URL="https://q2.daskeyboard.com"

HEADERS=(-H "X-API-KEY: $API_KEY" -H "Content-Type: application/json")
SIGNAL_ID="392"
URL="$BACKEND_URL/api/1.0/signals/$SIGNAL_ID"

curl "${HEADERS[@]}" -X DELETE $URL

 Copy

 Edit Script

var backendUrl = 'https://q2.daskeyboard.com';
var headers = {
    "Content-Type": "application/json",
    "X-API-KEY": "$API_KEY"
  }
// Library to make simplified HTTP client requests
// if not installed run npm install request
var request = require('request');

var signalId = 392;

request.delete({
    url: backendUrl + '/api/1.0/signals/' + signalId ,
    headers: headers,
    json: true
}, function (error, response) {
    // OK
    if (response && response.statusCode == 200) {
        console.log('response', response.body);
    }
    // OK from API response
    if(response && response.statusCode != 200){
        console.error(response.body);
    }
    // OK
    if (error) {
        console.error(error);
    }
});

 Copy

 Edit Script


backendUrl = 'https://q2.daskeyboard.com'

headers = { "Content-type": "application/json","X-API-KEY": "uS3qbfUi5sFNq2GU1j7EaAQkgdft0Zwg"}
# sudo pip install request if requests not found
import requests


signalId = 392

res_signal = requests.delete(backendUrl + '/api/1.0/signals/' + str(signalId),headers=headers)

# checking the response
if res_signal.ok:
    print "OK"
    print res_signal.text
else:
    print "Error: " + res_signal.text

 Copy

 Edit Script

BACKEND_URL="http://localhost:27301"
HEADERS=(-H "Content-Type: application/json")
SIGNAL_ID="392"
URL="$BACKEND_URL/api/1.0/signals/$SIGNAL_ID"

curl "${HEADERS[@]}" -X DELETE $URL

 Copy

 Edit Script

var backendUrl = 'http://localhost:27301';
var headers = {
    "Content-Type": "application/json"
  }
// Library to make simplified HTTP client requests
// if not installed run npm install request
var request = require('request');

var signalId = 392;

request.delete({
    url: backendUrl + '/api/1.0/signals/' + signalId ,
    headers: headers,
    json: true
}, function (error, response) {
    // OK
    if (response && response.statusCode == 200) {
        console.log('response', response.body);
    }
    // OK from API response
    if(response && response.statusCode != 200){
        console.error(response.body);
    }
    // OK
    if (error) {
        console.error(error);
    }
});

 Copy

 Edit Script

backendUrl = 'http://localhost:27301'
headers = { "Content-type": "application/json"}
# sudo pip install request if requests not found
import requests


signalId = 392

res_signal = requests.delete(backendUrl + '/api/1.0/signals/' + str(signalId),headers=headers)

# checking the response
if res_signal.ok:
    print "OK"
    print res_signal.text
else:
    print "Error: " + res_signal.text

 Copy

 Edit Script

Response

HTTP 200