# Remove devices from Data Storage Integration

**URL:** <https://www.thethingsnetwork.org/forum/t/remove-devices-from-data-storage-integration/8533>\
**Category:** Application Development\
**Created:** [July 18, 2017, 11:53am UTC](https://www.thethingsnetwork.org/forum/t/remove-devices-from-data-storage-integration/8533 "2017-07-18T11:53:36Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![denis](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@denis](https://www.thethingsnetwork.org/forum/u/denis)\
**Post date:** [July 18, 2017, 11:53am UTC](https://www.thethingsnetwork.org/forum/t/remove-devices-from-data-storage-integration/8533/1 "2017-07-18T11:53:36Z")

</div>

Hello everyone,

I have a question regarding the Data Storage Integration of an TTN Application.  
I used to have 2 devices registered to my application. After I deleted one  
device from my application, the EUI is still listed in the Data Storage Integration when  
query “get /api/v2/devices”.

My question is: Is there a way to remove the nonexistent device out of my dataintegration?

Thanks in advance  
Denis

---

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [July 18, 2017, 5:30pm UTC](https://www.thethingsnetwork.org/forum/t/remove-devices-from-data-storage-integration/8533/2 "2017-07-18T17:30:59Z")

</div>

The data is stored for 7 days. So unless someone tells you about a way to purge the stored data, it will be gone soon anyway.

---

<div class="post-metadata">

**Author:** ![denis](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@denis](https://www.thethingsnetwork.org/forum/u/denis)\
**Post date:** [July 19, 2017, 7:22am UTC](https://www.thethingsnetwork.org/forum/t/remove-devices-from-data-storage-integration/8533/3 "2017-07-19T07:22:15Z")

</div>

Hello arjanvanb,

unfortunately your statement is true for the payload that was sent by the device. but the device itself doesn’t get deleted. Is this an issue that only I’m facing?

Have you deleted a device from your application and have checked in the dataintegration if the device doesn’t show up anymore when querying “get /api/v2/devices”?

This would help me a lot to see if I’m the only one affected by my described problem.

Thanks in advance  
Denis

---

<div class="post-metadata">

**Author:** ![denis](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@denis](https://www.thethingsnetwork.org/forum/u/denis)\
**Post date:** [August 9, 2017, 12:41pm UTC](https://www.thethingsnetwork.org/forum/t/remove-devices-from-data-storage-integration/8533/4 "2017-08-09T12:41:37Z")

</div>

Hello @htdvisser,

can you help me please. Maybe you have an idea why the devicenames don’t get removed from the dataintegration after 7 days?  
An Answer would help me a lot.

Thank you in advance  
Denis

---

<div class="post-metadata">

**Author:** ![johan](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/johan/32/45177_2.png) [@johan](https://www.thethingsnetwork.org/forum/u/johan)\
**Post date:** [August 9, 2017, 2:27pm UTC](https://www.thethingsnetwork.org/forum/t/remove-devices-from-data-storage-integration/8533/5 "2017-08-09T14:27:48Z")

</div>

@denis it’s mostly a technical reason. The retention of 7 days is on the data, but we also store the number of stored messages per device per hour and this data has no retention. We don’t display this now, but the idea is that we might show you device activity per hour in the future, with a longer history than 7 days.

Summary: there’s still the device in the database, but not its data, only its number of message per hour.

---

<div class="post-metadata">

**Author:** ![denis](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@denis](https://www.thethingsnetwork.org/forum/u/denis)\
**Post date:** [August 9, 2017, 3:17pm UTC](https://www.thethingsnetwork.org/forum/t/remove-devices-from-data-storage-integration/8533/6 "2017-08-09T15:17:44Z")

</div>

Hello @johan,

thank you very much for that superfast response.  
Is there a way to delete the unused devices?

Best regards  
Denis

---

<div class="post-metadata">

**Author:** ![johan](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/johan/32/45177_2.png) [@johan](https://www.thethingsnetwork.org/forum/u/johan)\
**Post date:** [August 9, 2017, 4:00pm UTC](https://www.thethingsnetwork.org/forum/t/remove-devices-from-data-storage-integration/8533/7 "2017-08-09T16:00:04Z")

</div>

Unfortunately that’s not available today. I’ll raise an issue internally to support a `DELETE` call on the device level.

---

<div class="post-metadata">

**Author:** ![denis](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@denis](https://www.thethingsnetwork.org/forum/u/denis)\
**Post date:** [August 11, 2017, 9:45am UTC](https://www.thethingsnetwork.org/forum/t/remove-devices-from-data-storage-integration/8533/8 "2017-08-11T09:45:35Z")

</div>

Hello @johan,

thank you very much.  
Is there a way to track the issue, that i can stay up-to-date?

Kind regards  
Denis

---

<div class="post-metadata">

**Author:** ![denis](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@denis](https://www.thethingsnetwork.org/forum/u/denis)\
**Post date:** [August 18, 2017, 10:40am UTC](https://www.thethingsnetwork.org/forum/t/remove-devices-from-data-storage-integration/8533/9 "2017-08-18T10:40:49Z")

</div>

Hello @johan,

has the issue been opened?  
How can i keep track on the issue, in case there are  
any updates?

Kind regards  
Denis

---

<div class="post-metadata">

**Author:** ![johan](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/johan/32/45177_2.png) [@johan](https://www.thethingsnetwork.org/forum/u/johan)\
**Post date:** [October 30, 2017, 4:30pm UTC](https://www.thethingsnetwork.org/forum/t/remove-devices-from-data-storage-integration/8533/10 "2017-10-30T16:30:33Z")

</div>

We will address this in our next major release of The Things Network Stack!

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [April 1, 2019, 9:51am UTC](https://www.thethingsnetwork.org/forum/t/remove-devices-from-data-storage-integration/8533/12 "2019-04-01T09:51:07Z")

</div>


