When users delete data using the API method in the delete/data route or via the SDK .delete() method, the API executes in fact two operations: one to get the data using the query and another operation to actually delete the data. In the upcoming weeks, we will deploy a new version where both of these operations will consume input and output.

For example, executing a command to delete 3,000 registers in a bucket will count as 3,000 Data Input transactions and 3,000 Data Output transactions in the period. However, executing a command to get the last 10,000 registers where there are only 300 registers available will only cost 300 transactions for Input and Output.

We created an option to reduce operation costs by introducing a new parameter called 'async'. By specifying the async parameter as true during the delete request, the system will charge only for the Data Output transaction. The tradeoff here is that, as the name suggests, the delete operation using the async parameter will not be executed instantly; instead, the request will be put in a queue and it may take a few minutes or hours for it to be executed depending on how busy the TagoIO servers are at that time.

Is there any other way to delete data that is completely free? Absolutely! You can continuing to delete data from your buckets by using the bucket’s Data Retention feature.

For bulk operations, we are also adding a new method where you can define an 'until time'. With this new method, you can specify the variables, devices, and a time to stop the delete operation. When you use this new method, the server will read the request and start deleting the data until the desired “until time.” For example, a command through the API can be used to delete all data in the bucket until last Monday at 6am. This operation is async, meaning that it can take some time to be executed, but the bucket can be used normally while the operation is processed and once the server finishes processing the request, only the data with the registers newer than the specified time will be deleted. This is a very clever way to delete your data, and it’s also completely free!

This move is to prevent misuse of our API services while continuing to provide our customers with the best and most reliable overall services.

Feel free to contact us if you have any questions

- TagoIO Team.