Forum Discussion
I think it's the 427972 that's not right. Hard to say without navigating your IDs directly.
Here's what I'd do (in code or in postman). If this is what you're already doing, ignore:
/device/devices -> find the "id" of the device of interest (here, i'll call it $device_id)
/device/devices/$($device_id)/devicedatasources -> find the "id" (not the dataSourceId) of the datasource of interest (here, i'll call it $DS_id)
/device/devices/$($device_id)/devicedatasources/$($DS_id)/instances -> find the "id" of the instance of interest (here, i'll call it $instance_id)
/device/devices/$($device_id)/devicedatasources/$($DS_id)/instances/$($instance_id)/data -> should have data here from the last hour
For what it's worth, i was skeptical about postman too. I'm old school CLI as well. But i quickly got addicted. The other thing i got addicted to was the Python SDK. Combining it with my custom LM wrapper, the code becomes:
from lm import lm data = lm.get_device_datasource_instance_data(9,9512,146237749)
Where 9 is the $device_id, 9512 is the $DS_id, and 146237749 is the $instance_id.
Related Content
- 3 months ago
- 2 years ago
- 4 months ago