You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Data cleanup with the SensorThings API is currently very inconvenient. If you want to regularly delete all Observations older than 3 years, you have to first GET all those observations' ids, and then DELETE each Observation separately. You can do it in one Request using batch, but you still have to list each DELETE command.
I would suggest extending DELETE to also work on collections, and allow $filter to state which entities should be deleted.
Deleting all Observations older than 3 years could be as simple as:
DELETE v1.0/Observations?$filter=phenomenonTime lt now() sub duration'P3Y'
The text was updated successfully, but these errors were encountered:
The changes mentioned in #3 also add delete notification to the standard. It's probably a good idea to allow a server to not send notifications for items deleted using a filter.
Data cleanup with the SensorThings API is currently very inconvenient. If you want to regularly delete all Observations older than 3 years, you have to first GET all those observations' ids, and then DELETE each Observation separately. You can do it in one Request using batch, but you still have to list each DELETE command.
I would suggest extending DELETE to also work on collections, and allow $filter to state which entities should be deleted.
Deleting all Observations older than 3 years could be as simple as:
The text was updated successfully, but these errors were encountered: