Storage Integration V3 Access Problem

Dear TTN/TTS fans,

I migrated my Greenhouse Climate Device from V2 to V3 successfully. Data are visible at the TTS application console as expected.

The access to the V3 Storage Integration data by Curl unfortunately not successfully.

I used this example, found in the TTS documentation:

$ curl -G “https://thethings.example.com/api/v3/as/applications/app1/devices/dev1/packages/storage/uplink_message
-H “Authorization: Bearer $API_KEY”
-H “Accept: text/event-stream”
-d “limit=10”
-d “after=2020-08-20T00:00:00Z”
-d “field_mask=up.uplink_message.decoded_payload”

and from the storage integration page:

“GET https://eu1.cloud.thethings.network/api/v3/as/api/v3/as/applications/{application-id}/devices/{device_id}/packages/storage/{type}”

I generated the API_KEY adapted the Curl command as follows:

“-X GET ‘https://eu1.cloud.thethings.network/api/v3/as/api/v3/as/applications/{application-id}/devices/{device-id}/packages/storage/uplink_message’ -H ‘Accept: text/event-stream’ -H ‘Authorization: Bearer NNSXS.xxx.xxx’ -d ‘limit=10’ -d ‘after=2021-06-01T00:00:00Z’”;

The call was executed on an “HomeMatic” CCU3 by C++ script with following result:

{“code”:12,“message”:“Not Implemented”}

The available entries in the forum in this regard were unfortunately not helpful for me, and I found no additional information for this return code in the TTS documentation.

What do I wrong? I tried also skipping the limit, after and field mask parameters…

Thanks a lot for helping in advance,

Peter

p.s.: This was the V2 Curl command, which was running without any problems:

“-X GET --header ‘Accept: application/json’ --header 'Authorization: key ttn-account-v2.xxx’ ‘https://{application-id}.data.thethingsnetwork.org/api/v2/query/{device-id}’”;

Did you replace the app-id and device-id ???

This works for me:

curl -G "https://eu1.cloud.thethings.network/api/v3/as/applications/myFunkyApplicationID/packages/storage/uplink_message" \
    -H "Authorization: Bearer NNSXS.randomStuffHere" \
    -H "Accept: text/event-stream" \
    -d "limit=10" \
    -d "after=2020-08-20T00:00:00Z"

I’m presuming you’ve turned on Data Storage as well …

1 Like

Hi,

thank you very much for your reply.

Your example was the way to success.

I double, triple checked my data, but finally it was not my fault. Pfhhhh. :blush:
Please see the screen shot of the Storage Integration page. I remarked the “V3/as/” which is too much…

After correcting the string the call worked as expected :blush:.

This should be corrected on the console page. What is the correct way for an documentation issue?

Best Regards
Peter

Storage Integration

Please open an issue on GitHub - but for the lorawan-stack not for the docs, the docs are correct and what’s appearing there is in the console.

According to the TTN software engeneer, the fix is merged and will be part of the 3.13.2 release.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.