Deleting Data

Deleting Data

DEL - https://api.tago.io/data
Headers:
Authorization: Your device token.

Optional Query Strings

KEY
TYPE
DESCRIPTION
query
stringpre-defined by Tago

qty
string
Maximum number of data to be returned
start_date
string
Start date
end_date
stringend date
variable
stringFilter by Variable




To delete data, TagoIO uses the same query string used to get data, for more details about each query, see here.

Below, we will show some examples of DELETING data using query string.

Examples:

Deleting the last 99 items from the variable temperature.
https://api.tago.io/data?variable=temperature&qty=99

Tip: Make sure your request is DELETE and not POST when trying to delete items. Note that posting data is relatively instantaneous while deleting data can take between 10 and 30 seconds to complete.

Deleting the last item from the variable temperature. https://api.tago.io/data?variable=temperature&query=last_item

Deleting the last value from the variable temperature (requires the 'value' attribute on the variable object).
https://api.tago.io/data?variable=temperature&query=last_value

Deleting the last location from the variable temperature (requires 'location' attribute on the variable object).
https://api.tago.io/data?variable=temperature&query=last_location

Deleting by period.
https://api.tago.io/data?variable=temperature&start_date=2014-12-25&end_date=2014-12-26

Deleting the last value from an array of variables.
https://api.tago.io/data?variable[]=temperature&variable[]=pressure&query=last_value

Devices can only delete their own data.
This means that if have multiple devices in a bucket, and you create data from a device, other devices cannot delete that data.

    • Related Articles

    • Deleting Your Account

      If you need to cancel your account, go to 'Account Settings' by accessing My Account. Then, within the tab 'More', you will find the 'delete my account' button. We will delete your account, including all your profiles, and then we will confirm by ...
    • Getting Data

      HEADERS: Authorization: Your-Device-Token GET - https://api.tago.io/data QUERYSTRINGS: KEY TYPE DESCRIPTION variable string || array Get variables query string pre-defined by Tago qty string Maximum number of data to be returned.  start_date string ...
    • Data Export

      You can download data from your buckets using one of the available formats. Go to the list of Buckets, and click on the 'Export Data' icon located on the top right. Select the format of the file you want to download: CSV XLS JSON XML You can select ...
    • Data Storage

      Data storage is related to the variables stored in the data buckets that are fed by the devices. Each register is composed of a variable and all metadata associated with it. The data storage limit will define the maximum storage capacity for the ...
    • Sending Data

      A device can send data to TagoIO by using the POST method. POST https://api.tago.io/data KEY TYPE REQUIRED variable string [max 100 characters] yes unit string [max 25 characters] no value string/number/boolean [max 6kB]  no time string no group ...

      Aug 30 - Join us at TagoIO Connect Global, our annual conference. Learn new features and use cases. Register Here


        Future and past Webinars