# Storage integration 2 days duration + weird bugs in API

**URL:** <https://www.thethingsnetwork.org/forum/t/storage-integration-2-days-duration-weird-bugs-in-api/52112>\
**Category:** V3 Integrations\
**Created:** [October 5, 2021, 12:23am UTC](https://www.thethingsnetwork.org/forum/t/storage-integration-2-days-duration-weird-bugs-in-api/52112 "2021-10-05T00:23:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomascharad](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/tomascharad/32/42061_2.png) [@tomascharad](https://www.thethingsnetwork.org/forum/u/tomascharad)\
**Post date:** [October 5, 2021, 12:23am UTC](https://www.thethingsnetwork.org/forum/t/storage-integration-2-days-duration-weird-bugs-in-api/52112/1 "2021-10-05T00:23:15Z")

</div>

Hi!

We’ll I’m trying to develop over TTN Storage integration and I have faced the following problem:

1. If I don’t query over the **current day** when using after and before, I receive a 1 as a response.

(Being today the 4th of October)

[https://nam1.cloud.thethings.network/api/v3/as/applications/apartment-weather-station/packages/storage/uplink\_message?after=2021-09-01T00:00:00Z&before=2021-10-03T00:00:00Z](https://nam1.cloud.thethings.network/api/v3/as/applications/apartment-weather-station/packages/storage/uplink_message?after=2021-09-01T00:00:00Z&before=2021-10-03T00:00:00Z)

This response returns just a “1” (No data)

[https://nam1.cloud.thethings.network/api/v3/as/applications/apartment-weather-station/packages/storage/uplink\_message?after=2021-09-01T00:00:00Z&before=2021-10-04T00:00:00Z](https://nam1.cloud.thethings.network/api/v3/as/applications/apartment-weather-station/packages/storage/uplink_message?after=2021-09-01T00:00:00Z&before=2021-10-04T00:00:00Z)

This response returns data from the 2nd of October at 21:04 till today.

This brings me to the second question

1. As you can see I only have data from the 2nd of October, so, how long does Storage integrations holds the data?

Many thanks!!

---

<div class="post-metadata">

**Author:** ![htdvisser](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/htdvisser/32/45312_2.png) [@htdvisser](https://www.thethingsnetwork.org/forum/u/htdvisser)\
**Post date:** [October 5, 2021, 1:15pm UTC](https://www.thethingsnetwork.org/forum/t/storage-integration-2-days-duration-weird-bugs-in-api/52112/2 "2021-10-05T13:15:34Z")

</div>

In The Things Stack Community Edition, the storage integration has a retention of roughly 24 hours (it may be a bit longer if the cleanup process hasn’t run yet).

This means that if you query data from before the retention window, you’ll indeed get an empty response.

---

<div class="post-metadata">

**Author:** ![tomascharad](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/tomascharad/32/42061_2.png) [@tomascharad](https://www.thethingsnetwork.org/forum/u/tomascharad)\
**Post date:** [October 6, 2021, 12:54pm UTC](https://www.thethingsnetwork.org/forum/t/storage-integration-2-days-duration-weird-bugs-in-api/52112/3 "2021-10-06T12:54:17Z")

</div>

> [@htdvisser](#):
>
> the storage integration has a retention of roughly 24 hours (it may be a bit longer if the cleanup process hasn’t run yet).
> 
> This means that if you query data from before the retention window, you’ll indeed

Thanks!! everything makes sense now! maybe it could be added in the docs.
