The API to delete a signal is the following
DELETE https://api.databoom.com/v1/signals/{signalId}
To call the API an OAuth token with Delete permission is needed.
{signalId} in the URL must be replaced with the _id of the signal you want to delete.
It is possible to delete a signal only if you have Creator permissions.
Same call in cURL is
curl -X DELETE \
https://api.databoom.com/v1/signals/5cd2c7a2509393c4ac6427c5 \
-H 'Authorization: Bearer <OAuth Token>'
The API responds with the deleted signal, deleted and deletedAt fields are filled.
Follows an example response, description field is updated.
{
"deletedAt": "2019-05-08T13:52:14.695Z",
"deleted": true,
"_id": "5cd2c7a2509393c4ac6427c5",
"lastModUser": "5693799a2ce24d2300439324",
"revision": 2,
"device_token": "0rc0qi8qc0_del_1557323534695",
"device_description": "API test",
"device": "5cd2c794509393c4ac6427bb",
"type": "5718ca3f4ef29d440851589b",
"signal_token": "08atl0rfub_del_1557323534695",
"__v": 0,
"tags": [],
"created": "2019-05-08T12:12:18.278Z",
"lastModDate": "2019-05-08T13:52:14.712Z",
"public_obj": false,
"permissions": [
{
"_id": "5cd2c7a2509393c4ac6427c8",
"user_id": "5693799a2ce24d2300439324",
"roles": "CREATOR",
"max_chart_history": 0,
"fake": false,
"is_a_team_member": false
}
],
"virtual_signal_list": [],
"children": [],
"inline_virtual": false,
"virtual_signal": false,
"partial_cache": false,
"is_cached": false,
"virtual_compute_granularity": {
"granularity": "*",
"compute": false
},
"accumulator": {
"is_a_sum": false,
"offset": 0,
"start_date": "2019-05-08T12:12:18.278Z",
"active": false
},
"skip_log": false,
"log_on": true,
"alarms_on": true,
"info": [],
"rescale": {
"max_value": {
"evaluated": 1000,
"original": 1000
},
"min_value": {
"evaluated": 0,
"original": 0
},
"active": false
},
"chart_scale": {
"max_chart_scale": 0,
"min_chart_scale": 0,
"active": false
},
"min_granularity": "*",
"chart_type": "LINE",
"manual_edit_active": false,
"autocomplete": false,
"values_filtering": {
"enable": false
},
"decimals": 2,
"unit_prefix": "",
"unit": [],
"status": "INIT",
"command_status": {
"status": "EXECUTED"
},
"showEvents": false,
"command_label_rules": [],
"command_enable": false,
"orders": [],
"last_value_rules": [],
"sampling_rate": 5,
"notes": "",
"description": "New description",
"name": "",
"id": "5cd2c7a2509393c4ac6427c5"
}
0 Comments