# Deleting all measurements daily

**URL:** <https://community.cumulocity.com/t/deleting-all-measurements-daily/12475>\
**Category:** Forum\
**Tags:** analytics\
**Created:** [July 5, 2025, 9:21pm UTC](https://community.cumulocity.com/t/deleting-all-measurements-daily/12475 "2025-07-05T21:21:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GII](https://avatars.discourse-cdn.com/v4/letter/g/97f17d/32.png) [@GII](https://community.cumulocity.com/u/GII)\
**Post date:** [July 5, 2025, 9:21pm UTC](https://community.cumulocity.com/t/deleting-all-measurements-daily/12475/1 "2025-07-05T21:21:31Z")

</div>

Hello, we are pushing measurements daily to DB, for optimal storage we are thinking of deleting them after this push daily, how would it be possible to do a delete for all those measurements in one API call?

---

<div class="post-metadata">

**Author:** ![Harald\_Meyer](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/harald_meyer/32/1959_2.png) [@Harald\_Meyer](https://community.cumulocity.com/u/Harald_Meyer)\
**Post date:** [July 7, 2025, 5:05am UTC](https://community.cumulocity.com/t/deleting-all-measurements-daily/12475/2 "2025-07-07T05:05:11Z")

</div>

You can use this API:

> **[Cumulocity - OpenAPI](https://cumulocity.com/api/core/#operation/deleteMeasurementCollectionResource)**

- Note that depending on the billing metric used, deleted measurements will still count towards billing.
- Be careful with what you delete, there is no undo functionality. For tests, I would suggest to always include a “source” to restrict any deletions to a single device.
- if you are using time series mode, dateFrom and dateTo need to be aligned to full hours. This should not be a problem if you want to delete a whole day.
- Make sure you have the correct understanding of what a day is for you. dateFrom and dateTo will make use of whatever time zone information you provide. Apama normally runs in UTC timezone and “on at” listeners unless you specify a time zone as well.

---

<div class="post-metadata">

**Author:** ![Korbinian\_Butz1](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/korbinian_butz1/32/31227_2.png) [@Korbinian\_Butz1](https://community.cumulocity.com/u/Korbinian_Butz1)\
**Post date:** [July 7, 2025, 4:52pm UTC](https://community.cumulocity.com/t/deleting-all-measurements-daily/12475/3 "2025-07-07T16:52:35Z")

</div>

You could also have a look if Retention Rules fit your needs: [Managing data - Cumulocity documentation](https://cumulocity.com/docs/standard-tenant/managing-data/#retention-rules)
